mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-11-10 00:46:30 +00:00
43 lines
645 B
Bash
Executable file
43 lines
645 B
Bash
Executable file
#!/bin/sh
|
|
set -e # exit on failure
|
|
IFS=$(printf '\n\t') # smarter ifs
|
|
trap 'rm -rf "$DIR"' 0 1 2 3 6 14 15 EXIT
|
|
part0() { # dir setup
|
|
APP=$(basename "$0" | sed 's/^mk//')
|
|
DIR=/tmp/appdwarf/$APP
|
|
mkdir -p "$DIR"
|
|
}
|
|
|
|
|
|
ungz() { # default decomps
|
|
curl -L "$LINK" | tar xz -C"$DIR"
|
|
}
|
|
|
|
unbz() {
|
|
curl -L "$LINK" | tar xj -C"$DIR"
|
|
}
|
|
|
|
unxz() {
|
|
curl -L "$LINK" | tar xJ -C"$DIR"
|
|
}
|
|
|
|
unarc() {
|
|
curl -L "$LINK" | bsdtar xf - -C"$DIR"
|
|
}
|
|
|
|
|
|
appa() { # default appruns
|
|
appdwarf -a "$DIR"/AppRun
|
|
}
|
|
|
|
appb() {
|
|
appdwarf -b "$DIR"/AppRun
|
|
}
|
|
|
|
|
|
part9() { # ending bit
|
|
appdwarf "$DIR"
|
|
mv "$DIR".sh bin/"$APP"
|
|
rm -rf "$DIR"
|
|
}
|