@@ -8,23 +8,6 @@ is_available() {
8
8
command -v " $1 " > /dev/null 2>&1
9
9
}
10
10
11
- if is_available curl; then
12
- dwnld_cmd=" curl -LSs"
13
- elif is_available wget; then
14
- dwnld_cmd=" wget -q -O-"
15
- else
16
- echo " [-] No suitable download command could be found!" >&2
17
- exit 1
18
- fi
19
-
20
- $dwnld_cmd https://github.com/nathanchance/env/tarball/main | tar -C " $tmp_dir " -xvzf - --strip-components=1
21
-
22
- python_setup=$tmp_dir /python/setup
23
- if [ ! -d " $python_setup " ]; then
24
- echo " [-] $python_setup could not be found, did download command fail?" >&2
25
- exit 1
26
- fi
27
-
28
11
for file in /etc/os-release /usr/lib/os-release; do
29
12
# We don't care if this fails, we will fail on the next command
30
13
if . $file > /dev/null 2>&1 ; then
@@ -42,4 +25,21 @@ if ! is_available python3; then
42
25
fi
43
26
fi
44
27
28
+ if is_available curl; then
29
+ dwnld_cmd=" curl -LSs"
30
+ elif is_available wget; then
31
+ dwnld_cmd=" wget -q -O-"
32
+ else
33
+ echo " [-] No suitable download command could be found!" >&2
34
+ exit 1
35
+ fi
36
+
37
+ $dwnld_cmd https://github.com/nathanchance/env/tarball/main | tar -C " $tmp_dir " -xvzf - --strip-components=1
38
+
39
+ python_setup=$tmp_dir /python/setup
40
+ if [ ! -d " $python_setup " ]; then
41
+ echo " [-] $python_setup could not be found, did download command fail?" >&2
42
+ exit 1
43
+ fi
44
+
45
45
" $python_setup " /" ${ID_LIKE-$ID } " .py " $@ "
0 commit comments