Skip to content

Commit

Permalink
Update android-tools-appimage.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Samueru-sama authored Jun 9, 2024
1 parent ec0b365 commit c2b64fd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions android-tools-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,24 @@ ln -s ./Android.png ./.DirIcon
# AppRun
cat >> ./AppRun << 'EOF'
#!/bin/sh
CURRENTDIR="$(readlink -f "$(dirname "$0")")"/usr/bin
CURRENTDIR="$(dirname "$(readlink -f "$0")")"/usr/bin
UDEVNOTICE=$(echo "If you get errors it might be because of missing android udev rules, use --getudev to install them")
ARGS="$(echo "$@" | cut -f2- -d ' ')"
export PATH="$CURRENTDIR:$PATH"
if [ "$1" = "adb" ]; then
"$CURRENTDIR"/adb "$ARGS" || echo "$UDEVNOTICE"
"$CURRENTDIR"/adb $ARGS || echo "$UDEVNOTICE"
elif [ "$1" = "etc1tool" ]; then
"$CURRENTDIR"/etc1tool "$ARGS" || echo "$UDEVNOTICE"
"$CURRENTDIR"/etc1tool $ARGS || echo "$UDEVNOTICE"
elif [ "$1" = "fastboot" ]; then
"$CURRENTDIR"/fastboot "$ARGS" || echo "$UDEVNOTICE"
"$CURRENTDIR"/fastboot $ARGS || echo "$UDEVNOTICE"
elif [ "$1" = "make_f2fs" ]; then
"$CURRENTDIR"/make_f2fs "$ARGS" || echo "$UDEVNOTICE"
"$CURRENTDIR"/make_f2fs $ARGS || echo "$UDEVNOTICE"
elif [ "$1" = "make_f2fs_casefold" ]; then
"$CURRENTDIR"/make_f2fs_casefold "$ARGS" || echo "$UDEVNOTICE"
"$CURRENTDIR"/make_f2fs_casefold $ARGS || echo "$UDEVNOTICE"
elif [ "$1" = "mke2fs" ]; then
"$CURRENTDIR"/mke2fs "$ARGS" || echo "$UDEVNOTICE"
"$CURRENTDIR"/mke2fs $ARGS || echo "$UDEVNOTICE"
elif [ "$1" = "sqlite3" ]; then
"$CURRENTDIR"/sqlite3 "$ARGS" || echo "$UDEVNOTICE"
"$CURRENTDIR"/sqlite3 $ARGS || echo "$UDEVNOTICE"
elif [ "$1" = "--getudev" ]; then
if cat /etc/udev/rules.d/*droid.rules > /dev/null; then
echo "udev rules already installed"
Expand Down

0 comments on commit c2b64fd

Please sign in to comment.