Updated bootstrap to allow for easy git installs
This commit is contained in:
parent
19a5dfbc41
commit
1c6fec2a1f
3 changed files with 66 additions and 33 deletions
|
|
@ -1,37 +1,7 @@
|
|||
#!/bin/env sh
|
||||
|
||||
HYPRDROP_GIT_PATH="$HOME/.cache/hyprdrop"
|
||||
addGitInstall "hyprdrop" "https://github.com/kjlo/hyprdrop" setup_hyprdrop
|
||||
|
||||
install_hyprdrop() {
|
||||
PREV_DIRECTORY=$PWD
|
||||
|
||||
if [ ! -d "$HYPRDROP_GIT_PATH" ]; then
|
||||
git clone https://github.com/kjlo/hyprdrop "$HYPRDROP_GIT_PATH"
|
||||
fi
|
||||
|
||||
cd ~/.cache/hyprdrop
|
||||
setup_hyprdrop() {
|
||||
cargo install --path .
|
||||
|
||||
cd $PREV_DIRECTORY
|
||||
}
|
||||
|
||||
check_hyprdrop() {
|
||||
if [ ! -d "$HOME/.cache/hyprdrop" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
PREV_DIRECTORY=$PWD
|
||||
|
||||
cd $HYPRDROP_GIT_PATH
|
||||
|
||||
if ! git remote update && git status | grep behind >>/dev/null; then
|
||||
cd $PREV_DIRECTORY
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
if check_hyprdrop; then
|
||||
addActions install_hyprdrop
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -6,4 +6,8 @@ reloadDarkman() {
|
|||
darkman toggle
|
||||
}
|
||||
|
||||
addActions reloadDarkman
|
||||
reloadHyprland() {
|
||||
hyprctl reload
|
||||
}
|
||||
|
||||
addActions reloadDarkman reloadHyprland
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue