summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGNUxeava <bluenerd@protonmail.com>2022-02-21 10:58:00 +0530
committerGNUxeava <bluenerd@protonmail.com>2022-02-21 10:58:00 +0530
commit8e2e94abfde29d393debc4bc7aa879a3cf8116b5 (patch)
tree9ca8f548d89ea83e88db8cac781a8afb70d41212
parentcd75c143a6f13dfd34a16a3c29aa9517e99f1044 (diff)
update install script to fetch and install
-rwxr-xr-xinstall.sh16
1 files changed, 6 insertions, 10 deletions
diff --git a/install.sh b/install.sh
index 200c072..e822231 100755
--- a/install.sh
+++ b/install.sh
@@ -34,10 +34,10 @@ case $1 in
;;
*)
- echo "Usage: $0 <install-mode> [<version>] [<systemd-service>]"
+ echo "Usage: $0 <install-mode> [<version>]"
echo " <install-mode>: (string) 'user' installs to '~/.local/bin/', 'system' installs to '/usr/local/bin'"
- echo " <version>: (string) defaults to local, which will install from the local copy of the repo. Use 'latest' which will determine the latest tag from git or specified branch/tag"
- echo -e "\nPlease note: The order of the parameters *is* relevant, if you want to set '<system-service>' you need to specify '<version>' as well!"
+ echo " <version>: (string) defaults to local, which will install from the local copy of the repo. Use 'latest', which will discard any change made locally and update the repo"
+ echo -e "\nPlease note: The order of the parameters *is* relevant."
exit 1
;;
esac
@@ -70,14 +70,10 @@ echof ok "done!"
VERSION=$2
if [[ $VERSION == "latest" ]]; then
- echof info "Determinate latest release... "
- VERSION=$(git describe --tags "$(git rev-list --tags --max-count=1)")
+ echof info "Updating the repo"
+ git restore .
+ git clone --no-rebase
echof ok "done! ($VERSION)"
-
- BLI_TEMP_DIR=$(mktemp -d)
-
- git clone -b "$VERSION" https://github.com/GNUxeava/betterlockscreen "$BLI_TEMP_DIR" &>/dev/null
- cd "$BLI_TEMP_DIR" || exit 1
fi
echof info "Installing Betterlockscreen to '$BL_INSTALL_DIR'... "
cp betterlockscreen "$BL_INSTALL_DIR"