wip
This commit is contained in:
parent
00ac710e50
commit
0269c60f83
1 changed files with 12 additions and 12 deletions
24
hyprlock.sh
24
hyprlock.sh
|
@ -1,22 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
unset PACKAGE &&
|
||||
PACKAGE=hyprlock &&
|
||||
echo_note "Installing $PACKAGE.."
|
||||
|
||||
sleep 1
|
||||
|
||||
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
||||
command_exists() {
|
||||
command -v "$@" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
if command_exists $PACKAGE; then
|
||||
echo_warning "$PACKAGE is alread installed!"
|
||||
echo_warning "Exiting now!"
|
||||
exit 69
|
||||
fi
|
||||
|
||||
# WHY:
|
||||
# This import will give you the following variables:
|
||||
# _sudo="sudo -E" <- only if non root user
|
||||
|
@ -44,6 +32,18 @@ getImports() {
|
|||
source "$import"
|
||||
sleep 0.2
|
||||
rm "$import"
|
||||
|
||||
if command_exists $PACKAGE; then
|
||||
echo_warning "$PACKAGE is alread installed!"
|
||||
echo_warning "Exiting now!"
|
||||
exit 69
|
||||
fi
|
||||
|
||||
unset PACKAGE &&
|
||||
PACKAGE=hyprlock &&
|
||||
echo_note "Installing $PACKAGE.."
|
||||
|
||||
sleep 1
|
||||
}
|
||||
|
||||
checkComp() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue