mirror of
https://git.adityakumar.xyz/betterlockscreen-openrc.git
synced 2024-11-22 06:52:53 +00:00
remove systemd specific parts and change remote URL to this fork
This commit is contained in:
parent
00d8244540
commit
688c17f7a9
1 changed files with 1 additions and 19 deletions
20
install.sh
20
install.sh
|
@ -37,7 +37,6 @@ case $1 in
|
||||||
echo "Usage: $0 <install-mode> [<version>] [<systemd-service>]"
|
echo "Usage: $0 <install-mode> [<version>] [<systemd-service>]"
|
||||||
echo " <install-mode>: (string) 'user' installs to '~/.local/bin/', 'system' installs to '/usr/local/bin'"
|
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 " <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 " [WIP: We are not supposed to cater to systemd so this option will not work] <systemd-service>: (boolean) defaults to 'false' - Whether to copy and enable system-service"
|
|
||||||
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 -e "\nPlease note: The order of the parameters *is* relevant, if you want to set '<system-service>' you need to specify '<version>' as well!"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
@ -74,33 +73,16 @@ if [[ $VERSION == "latest" ]]; then
|
||||||
echof info "Determinate latest release... "
|
echof info "Determinate latest release... "
|
||||||
VERSION=$(git describe --tags "$(git rev-list --tags --max-count=1)")
|
VERSION=$(git describe --tags "$(git rev-list --tags --max-count=1)")
|
||||||
echof ok "done! ($VERSION)"
|
echof ok "done! ($VERSION)"
|
||||||
#fi
|
|
||||||
|
|
||||||
BLI_TEMP_DIR=$(mktemp -d)
|
BLI_TEMP_DIR=$(mktemp -d)
|
||||||
|
|
||||||
git clone -b "$VERSION" https://github.com/pavanjadhaw/betterlockscreen "$BLI_TEMP_DIR" &>/dev/null
|
git clone -b "$VERSION" https://github.com/GNUxeava/betterlockscreen "$BLI_TEMP_DIR" &>/dev/null
|
||||||
cd "$BLI_TEMP_DIR" || exit 1
|
cd "$BLI_TEMP_DIR" || exit 1
|
||||||
fi
|
fi
|
||||||
echof info "Installing Betterlockscreen to '$BL_INSTALL_DIR'... "
|
echof info "Installing Betterlockscreen to '$BL_INSTALL_DIR'... "
|
||||||
cp betterlockscreen "$BL_INSTALL_DIR"
|
cp betterlockscreen "$BL_INSTALL_DIR"
|
||||||
echof ok "done!"
|
echof ok "done!"
|
||||||
|
|
||||||
if [[ $3 == "true" ]]; then
|
|
||||||
SYSTEMD_SERVICE_DIR="/usr/lib/systemd/system"
|
|
||||||
|
|
||||||
echof info "Installing/enable sytemd-service... "
|
|
||||||
|
|
||||||
if [[ ! -w $SYSTEMD_SERVICE_DIR ]]; then
|
|
||||||
echof error "\nUnable to write to '$SYSTEMD_SERVICE_DIR'!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp system/betterlockscreen@.service $SYSTEMD_SERVICE_DIR
|
|
||||||
systemctl enable betterlockscreen@"$USER"
|
|
||||||
|
|
||||||
echof ok "done!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $PATH != *"$BL_INSTALL_DIR"* ]]; then
|
if [[ $PATH != *"$BL_INSTALL_DIR"* ]]; then
|
||||||
echof error "Please ensure to add 'export PATH=\"\$PATH:/home/\$USER/.local/bin\"' to your shell-config!\033[0m"
|
echof error "Please ensure to add 'export PATH=\"\$PATH:/home/\$USER/.local/bin\"' to your shell-config!\033[0m"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue