Skip to content

Commit

Permalink
add: gitman support
Browse files Browse the repository at this point in the history
  • Loading branch information
acidicneko committed Jan 31, 2024
1 parent 625bc57 commit 7bd90de
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions gitman_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
install() {
make -j $(nproc)
mv build/zeta "$GITMAN_BIN"/zeta
mkdir -p ~/.config/zeta
cp -r assets/* ~/.config/zeta/
chmod +x ~/.config/zeta/update.sh
CURRENT_HASH=$(curl -H "Accept: application/vnd.github+json" \
https://api.github.com/repos/acidicneko/zeta/commits/main \
| grep sha \
| awk 'NR==1{print $2}' \
| sed 's/[",]//g')
echo "LAST_HASH=$CURRENT_HASH" > "$HOME"/.config/zeta/last_commit
}

uninstall() {
rm "$GITMAN_BIN"/zeta
rm -rf ~/.config/zeta
}

if [ $1 = "install" ] ; then
install
elif [ $1 = "uninstall" ] ; then
uninstall
else
echo unknown option
exit 1
fi

0 comments on commit 7bd90de

Please sign in to comment.