Browse Source

Generate script takes tag name

pull/7/head
Adyanth H 1 year ago
parent
commit
a03f20befb
  1. 2
      README.md
  2. 8
      generate-tar.sh

2
README.md

@ -2,7 +2,7 @@
1. Extract the contents of root to your filesystem root:
```
tar x -zvC / -f tailscale-enabler-<version>.tgz
tar x -zvC / -f openwrt-tailscale-enabler-<tag>.tgz
```
2. Install the prerequisites for wget and tailscale:

8
generate-tar.sh

@ -1,5 +1,11 @@
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "[ERR] Please pass in the tag for the file name."
exit 1
fi
filename="openwrt-tailscale-enabler-$1.tgz"
# Falls back to busybox tar syntax if running on openwrt busybox tar rather than GNU tar
filename="tailscale-enabler-$(git rev-parse HEAD | cut -c1-5).tgz"
tar -czvf $filename usr/ etc/ || tar c -zvf $filename usr/ etc/

Loading…
Cancel
Save