mirror of
https://git.adityakumar.xyz/betterlockscreen-openrc.git
synced 2024-11-22 06:52:53 +00:00
Merge pull request #273 from pavanjadhaw/beta_fix_installer
v4.0.0-beta2: Fix installer to detect i3lock-color also if named i3lock
This commit is contained in:
commit
caa0350752
1 changed files with 9 additions and 1 deletions
10
install.sh
10
install.sh
|
@ -1,5 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cmd_exists () {
|
||||||
|
command -v "$1" >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
echof() {
|
echof() {
|
||||||
local colorReset="\033[0m"
|
local colorReset="\033[0m"
|
||||||
local prefix="$1"
|
local prefix="$1"
|
||||||
|
@ -55,8 +59,12 @@ DEPS["xdpyinfo"]="xdpyinfo"
|
||||||
DEPS["xrdb"]="xrdb"
|
DEPS["xrdb"]="xrdb"
|
||||||
DEPS["xset"]="xset"
|
DEPS["xset"]="xset"
|
||||||
|
|
||||||
|
if ! cmd_exists DEPS["i3lock-color"] && cmd_exists "i3lock"; then
|
||||||
|
DEPS["i3lock-color"]="i3lock"
|
||||||
|
fi
|
||||||
|
|
||||||
for key in "${!DEPS[@]}"; do
|
for key in "${!DEPS[@]}"; do
|
||||||
[[ ! -e "$(command -v ${DEPS[$key]})" ]] && echof error "Missing '$key'!" && exit 1
|
[[ ! -e "$(command -v ${DEPS[$key]})" ]] && echof error "Missing '$key' under binary named '${DEPS[$key]}'!" && exit 1
|
||||||
done
|
done
|
||||||
|
|
||||||
echof ok "done!"
|
echof ok "done!"
|
||||||
|
|
Loading…
Reference in a new issue