betterlockscreen icon indicating copy to clipboard operation
betterlockscreen copied to clipboard

Installation-Script: Include checks at the end if installation was successful

Open kitesi opened this issue 4 years ago • 3 comments

On the readme, one of the ways to install is through a url script:

wget https://git.io/JZyxV -O - -q | bash -- system
wget https://git.io/JZyxV -O - -q | bash -- user

These both do not work, for me atleast. The bash command still recognizes system and user as an argument to bash rather than the script. Looking online and on the manual page, I think the proper way to do it is using -s system|user instead

wget https://git.io/JZyxV -O - -q | bash -s user

The installation script also did not properly check if I had i3lock-color installed since it just fell back on the i3lock command.

if ! cmd_exists DEPS["i3lock-color"] && cmd_exists "i3lock"; then
	DEPS["i3lock-color"]="i3lock"
fi

When using the script url alone, if you don't provide a version it tries to automatically get the version but it assumes you already cloned the repo which doesn't make sense.

VERSION=$2
if [[ $VERSION == "" ]] || [[ $VERSION == "latest" ]]; then
	echof info "Determinate latest release... "
	VERSION=$(git describe --tags "$(git rev-list --tags --max-count=1)")
	echof ok "done! ($VERSION)"
fi

As a result the VERSION variable is left empty and the script doesn't properly clone the repo and fails silently.

cp betterlockscreen "$BL_INSTALL_DIR" does not work if you chose a system wide installation and are not root, maybe include doas or sudo at the start if the user chose system wide.

At the end there also was no check to see if it installed properly.

kitesi avatar Jan 21 '22 00:01 kitesi

Thanks for pointing out and sorry for the delay to getting back on this! I've updated the setup script and adjusted the README, as even the urls (git.io stopped their services) were wrong (before moving the project to an GitHub-Org).

The installation script also did not properly check if I had i3lock-color installed since it just fell back on the i3lock command.

We had issue-reports to do this as some distros provide i3lock-color as i3lock-replacement with the binary named i3lock

At the end there also was no check to see if it installed properly.

This is still open, we are open for PR's on it :)

SebTM avatar Oct 09 '22 18:10 SebTM

Hey folks! It looks like a lot of the install script issues have been fixed in the next branch (thanks!) but not merged into main so the install wget urls in the README (which point to main) still run the old broken script.

Can we do a merge soon?

o-nikolas avatar Jan 07 '23 03:01 o-nikolas

@o-nikolas Thanks for pointing out, I've updated the install-script in main. Will do a beta-release of next in a few days.

SebTM avatar Jan 07 '23 16:01 SebTM