You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: package_tool
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ usage()
10
10
echo" --usage: This usage message."
11
11
echo" --pip_packages: comma separated list of pip modules to install"
12
12
echo" --python_exec: path to python interpreter to install pip modules for (default \"python3\"), will require installation of relevant packages to install pip"
echo" --python_exec: path to python intrepreter to install pip modules for (default \"python3\"), will require installation of relevant packages to install pip"
13
15
exit 1
14
16
}
15
17
@@ -27,10 +29,19 @@ remove_packages=""
27
29
wrapper_config=""
28
30
pip_packages=""
29
31
python_exec="python3"
32
+
update_cache=1
33
+
cache_cmd=""
30
34
31
35
base_dir=$(dirname $(realpath $0))
32
36
running_os=$($base_dir/detect_os)
33
37
38
+
update_system_cache() {
39
+
if [[ "$update_cache"-eq 1 ]];then
40
+
$install_cmd$cache_cmd
41
+
fi
42
+
update_cache=0 # Prevent multiple cache updates
43
+
}
44
+
34
45
# Install System packages
35
46
# Args:
36
47
# - Comma separated list of packages, can also be space separated and work
0 commit comments