-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathajam
More file actions
executable file
·36 lines (36 loc) · 879 Bytes
/
ajam
File metadata and controls
executable file
·36 lines (36 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
set -e
if ! soar --version >/dev/null 2>&1; then
wget -qOsoar "https://github.com/pkgforge/bin/raw/refs/heads/main/$(arch)-Linux/soar"
chmod a+x soar
mv soar /usr/bin || exit
fi
soar --version
binary() {
bin="$1"
case $bin in
darkhttpd)
if [ -s /runjob ]; then
wget -qO/usr/bin/mc "https://dl.min.io/client/mc/release/linux-$(case $(arch) in aarch64) echo arm64 ;; *) echo amd64 ;; esac)/mc" && chmod a+x /usr/bin/mc
fi
echo httpd-asm
;;
*)
echo "$bin"
;;
esac
}
for bin; do
ALIAS=${bin%:*}
BIN=$(binary "${bin#*:}")
if [ "${ALIAS%/*}" != "$ALIAS" ]; then
mkdir -p "${ALIAS%/*}"
fi
soar install --quiet --yes --binary-only "$BIN"
if [ -L "$HOME/.local/share/soar/bin/$BIN" ]; then
cp -L "$HOME/.local/share/soar/bin/$BIN" "$ALIAS"
ls -l "$ALIAS"
fi
done
soar info
rm -rf "$HOME/.local/share/soar"