mirror of
https://github.com/Phantop/appdwarf.git
synced 2025-01-08 13:17:24 +00:00
Improve default options
This commit is contained in:
parent
6c9813cd46
commit
5eca8a2ad8
4
appdwarf
4
appdwarf
|
@ -11,10 +11,10 @@ usage(){
|
|||
}
|
||||
|
||||
dwarf() {
|
||||
mkdwarfs -i "$1" -o "$(basename "$1").sh" "${@:2}" --header <(cat << 'EOF'
|
||||
mkdwarfs -i "$1" -o "$(basename "$1").sh" -B5 "${@:2}" --header <(cat << 'EOF'
|
||||
#!/bin/sh
|
||||
DIR="$(mktemp -td dwarf_$(basename "$0")XXXXX)"
|
||||
dwarfs -o offset=auto "$0" "$DIR" 2> /dev/null
|
||||
dwarfs -o offset=auto -o tidy_strategy=swap "$0" "$DIR" 2> /dev/null
|
||||
"$DIR/AppRun" "$@"
|
||||
fusermount -uz "$DIR" 2> /dev/null
|
||||
rmdir "$DIR" 2> /dev/null
|
||||
|
|
8
mkjava
8
mkjava
|
@ -2,8 +2,9 @@
|
|||
PATH=$(dirname $(readlink -f "${0}")):$PATH
|
||||
DIR=/tmp/dwarf-portable-executable/java
|
||||
mkdir -p $DIR
|
||||
curl -L https://api.adoptopenjdk.net/v3/binary/latest/11/ga/linux/x64/jre/openj9/normal/adoptopenjdk | tar xz -C$DIR
|
||||
curl -L https://api.adoptopenjdk.net/v3/binary/latest/$1/ga/linux/x64/jre/openj9/normal/adoptopenjdk | tar xz -C$DIR
|
||||
JDK=$(echo $DIR/jdk*)
|
||||
ver=$1
|
||||
|
||||
cat > $JDK/AppRun << 'EOF'
|
||||
#!/bin/sh
|
||||
|
@ -15,6 +16,7 @@ EOF
|
|||
|
||||
chmod +x $JDK/AppRun
|
||||
|
||||
appdwarf $JDK
|
||||
mv $(basename $JDK).sh java
|
||||
shift
|
||||
appdwarf $JDK $@
|
||||
mv $(basename $JDK).sh java$ver
|
||||
rm -rf $DIR
|
||||
|
|
Loading…
Reference in a new issue