Adds bootstrap.v2
This commit is contained in:
parent
06c8003cf2
commit
2bbccb4595
61 changed files with 468 additions and 4 deletions
37
.config/yadm/bootstrap.v2/applications/30-Hyprdrop.sh
Executable file
37
.config/yadm/bootstrap.v2/applications/30-Hyprdrop.sh
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/env sh
|
||||
|
||||
HYPRDROP_GIT_PATH="$HOME/.cache/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
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue