Skip to content

Commit

Permalink
Refactor customize.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
MyPC committed Dec 20, 2023
1 parent 08d837c commit 6c86fd1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ ui_print "- Detected architecture: $F_ARCH"
ui_print "- Extracting module files"

F_TARGETDIR="$MODPATH/system/bin"
UNZIP="/data/adb/magisk/busybox unzip"

mkdir -p "$F_TARGETDIR"
$UNZIP -qq -o "$ZIPFILE" "files/tailscaled-$F_ARCH" -j -d "$F_TARGETDIR"
$UNZIP -qq -o "$ZIPFILE" "files/tailscale-$F_ARCH" -j -d "$F_TARGETDIR"
unzip -qq -o "$ZIPFILE" "files/tailscaled-$F_ARCH" -j -d "$F_TARGETDIR"
unzip -qq -o "$ZIPFILE" "files/tailscale-$F_ARCH" -j -d "$F_TARGETDIR"

mv "$F_TARGETDIR/tailscaled-$F_ARCH" "$F_TARGETDIR/tailscaled"
mv "$F_TARGETDIR/tailscale-$F_ARCH" "$F_TARGETDIR/tailscale"
Expand All @@ -21,13 +20,11 @@ ui_print "- Extracted files to $F_TARGETDIR"

ui_print "- Setting permissions"

set_perm_recursive $MODPATH 0 0 0755 0644
set_perm_recursive $F_TARGETDIR 0 2000 0755 0755
set_perm $MODPATH/service.sh 0 0 0755

ui_print "- Cleaning up"

rm -r "$F_TARGETDIR/files" # cleanup
rm -r "$MODPATH/files" # cleanup

ui_print "*******************"
ui_print " Instructions "
Expand Down

0 comments on commit 6c86fd1

Please sign in to comment.