File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ need_root() { [ "$(id -u)" -eq 0 ] || die "root required"; }
1010get_latest_version () { curl -fsSL " https://api.github.com/repos/$REPO /releases/latest" | grep ' "tag_name"' | cut -d' "' -f4; }
1111get_arch () { case " $( uname -m) " in x86_64) echo amd64;; aarch64|arm64) echo arm64;; * ) die " unsupported arch: $( uname -m) " ;; esac ; }
1212download_binary () {
13- local ver=$( get_latest_version) arch=$( get_arch) os=$( uname -s | tr ' [:upper:]' ' [:lower:]' )
13+ local ver=$( get_latest_version) ver_num= ${ver # v} arch=$( get_arch) os=$( uname -s | tr ' [:upper:]' ' [:lower:]' )
1414 echo " Downloading nodepass $ver ..."
15- curl -fsSL " https://github.com/$REPO /releases/download/$ver /nodepass_${os} _${arch} .tar.gz" -o /tmp/nodepass.tar.gz
15+ curl -fsSL " https://github.com/$REPO /releases/download/$ver /nodepass_${ver_num} _ ${ os} _${arch} .tar.gz" -o /tmp/nodepass.tar.gz
1616 tar -xzf /tmp/nodepass.tar.gz -C " $( dirname " $BIN " ) " && chmod +x " $BIN " && rm -f /tmp/nodepass.tar.gz
1717}
1818install_service () {
You can’t perform that action at this time.
0 commit comments