mirror of
https://github.com/Phantop/appdwarf.git
synced 2025-11-22 13:03:40 +00:00
Put everything through shellcheck
This commit is contained in:
parent
e3bbef6c98
commit
c043fb00ef
6
AppRun
6
AppRun
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
HERE=$(dirname $(readlink -f "${0}"))
|
HERE=$(dirname "$(readlink -f "${0}")")
|
||||||
export LD_LIBRARY_PATH="${HERE}":$PATH
|
export LD_LIBRARY_PATH="${HERE}":"$PATH"
|
||||||
"${HERE}"/$APPDWARF_CMD "$@"
|
"${HERE}"/"$APPDWARF_CMD" "$@"
|
||||||
|
|
|
||||||
10
appdwarf
10
appdwarf
|
|
@ -2,8 +2,8 @@
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
IFS=$'\n\t'
|
IFS=$'\n\t'
|
||||||
VER=2
|
VER=2
|
||||||
HERE=$(dirname $(readlink -f "${0}"))
|
HERE=$(dirname "$(readlink -f "${0}")")
|
||||||
source $HERE/headers
|
source "$HERE/headers"
|
||||||
|
|
||||||
usage(){
|
usage(){
|
||||||
echo "Usage: $(basename "$0") [option] [FILE/FOLDER/URL]"
|
echo "Usage: $(basename "$0") [option] [FILE/FOLDER/URL]"
|
||||||
|
|
@ -14,12 +14,12 @@ usage(){
|
||||||
echo " -s, --separate Use old, separated header format"
|
echo " -s, --separate Use old, separated header format"
|
||||||
echo " -u, --url Fetch AppImage from URL and convert to appdwarf"
|
echo " -u, --url Fetch AppImage from URL and convert to appdwarf"
|
||||||
|
|
||||||
echo " -h, --help Print this help text"
|
echo " -h, --help iPrint this help text"
|
||||||
echo " -v, --version Print the appdwarf version"
|
echo " -v, --version Print the appdwarf version"
|
||||||
}
|
}
|
||||||
|
|
||||||
dwarf() {
|
dwarf() {
|
||||||
mkdwarfs -i "$1" -o "$(realpath "$1").sh" -B$back "${@:2}" --header $HEAD
|
mkdwarfs -i "$1" -o "$(realpath "$1").sh" -B"$back" "${@:2}" --header "$HEAD"
|
||||||
chmod +x "$(realpath "$1").sh"
|
chmod +x "$(realpath "$1").sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -58,7 +58,7 @@ do
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
--folder | -f)
|
--folder | -f)
|
||||||
header_folder $(realpath $2)
|
header_folder "$(realpath "$2")"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--lookback | -b)
|
--lookback | -b)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
LINK1=https://raw.githubusercontent.com/AppImage/appimage.github.io/master/apps/$1.md
|
LINK1=https://raw.githubusercontent.com/AppImage/appimage.github.io/master/apps/$1.md
|
||||||
LINK2="$(curl $LINK1 | grep -o https.\*releases | sed 's|github.com|api.github.com/repos|')"
|
LINK2="$(curl "$LINK1" | grep -o https.\*releases | sed 's|github.com|api.github.com/repos|')"
|
||||||
LINK3="$(curl $LINK2 | grep -v arm64 | grep -om1 https.\*AppImage)"
|
LINK3="$(curl "$LINK2" | grep -v arm64 | grep -om1 https.\*AppImage)"
|
||||||
appdwarf -u $LINK3
|
appdwarf -u "$LINK3"
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
PATH=$(dirname $(readlink -f "${0}"))/..:$PATH
|
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
|
||||||
DIR=/tmp/dwarf-portable-executable
|
DIR=/tmp/dwarf-portable-executable
|
||||||
mkdir -p $DIR
|
mkdir -p $DIR
|
||||||
LINK=$(curl -sL https://golang.org/dl | grep -om1 dl/go.\*linux-amd64.tar.gz)
|
LINK=$(curl -sL https://golang.org/dl | grep -om1 dl/go.\*linux-amd64.tar.gz)
|
||||||
curl -L https://golang.org/$LINK | tar xz -C$DIR
|
curl -L https://golang.org/"$LINK" | tar xz -C$DIR
|
||||||
|
|
||||||
cat > $DIR/go/AppRun << 'EOF'
|
cat > $DIR/go/AppRun << 'EOF'
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
PATH=$(dirname $(readlink -f "${0}"))/..:$PATH
|
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
|
||||||
DIR=/tmp/dwarf-portable-executable/java
|
DIR=/tmp/dwarf-portable-executable/java
|
||||||
JRE=$DIR/jre
|
JRE=$DIR/jre
|
||||||
VER=$1
|
VER=$1
|
||||||
mkdir -p $DIR
|
mkdir -p $DIR
|
||||||
|
|
||||||
LINK=https://api.adoptium.net/v3/binary/latest/$1/ga/linux/x64/jdk/hotspot/normal/eclipse
|
LINK=https://api.adoptium.net/v3/binary/latest/$1/ga/linux/x64/jdk/hotspot/normal/eclipse
|
||||||
curl -L $LINK | tar xz -C$DIR
|
curl -L "$LINK" | tar xz -C$DIR
|
||||||
$DIR/jdk*/bin/jlink --add-modules ALL-MODULE-PATH --output $JRE --strip-debug --no-man-pages --no-header-files --compress=0
|
$DIR/jdk*/bin/jlink --add-modules ALL-MODULE-PATH --output $JRE --strip-debug --no-man-pages --no-header-files --compress=0
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -21,5 +21,5 @@ chmod +x $JRE/AppRun
|
||||||
|
|
||||||
shift
|
shift
|
||||||
appdwarf $JRE $@
|
appdwarf $JRE $@
|
||||||
mv $JRE.sh java$VER
|
mv $JRE.sh java"$VER"
|
||||||
rm -rf $DIR
|
rm -rf $DIR
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
PATH=$(dirname $(readlink -f "${0}"))/..:$PATH
|
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
|
||||||
DIR=/tmp/dwarf-portable-executable/proton
|
DIR=/tmp/dwarf-portable-executable/proton
|
||||||
mkdir -p $DIR
|
mkdir -p $DIR
|
||||||
|
|
||||||
LINK="$(curl https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases | grep -om1 http.\*tar.gz)"
|
LINK="$(curl https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases | grep -om1 http.\*tar.gz)"
|
||||||
curl -L $LINK | tar xz -C$DIR
|
curl -L "$LINK" | tar xz -C$DIR
|
||||||
mv $DIR/Proton*/files/* $DIR
|
mv $DIR/Proton*/files/* $DIR
|
||||||
rm -rf $DIR/Proton*/
|
rm -rf $DIR/Proton*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
PATH=$(dirname $(readlink -f "${0}"))/..:$PATH
|
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
|
||||||
DIR=/tmp/dwarf-portable-executable/wine
|
DIR=/tmp/dwarf-portable-executable/wine
|
||||||
mkdir -p $DIR
|
mkdir -p $DIR
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue