Initial Commit
This commit is contained in:
commit
fb9e4f9eff
18 changed files with 564 additions and 0 deletions
16
lib/deploy.sh
Normal file
16
lib/deploy.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
REPO_LIST="https://git.faulty.nl/didier/dotfiles"
|
||||
DOTFILES_DIR="$HOME/.local/dotfiles"
|
||||
|
||||
clone() {
|
||||
for repo in $REPO_LIST; do
|
||||
git clone "$repo" "$DOTFILES_DIR" && return 0
|
||||
done
|
||||
}
|
||||
|
||||
main() {
|
||||
[ -d "$DOTFILES_DIR" ] || clone
|
||||
cd "$DOTFILES_DIR" || exit 1
|
||||
./sync.sh "$@"
|
||||
}
|
19
lib/lib.sh
Normal file
19
lib/lib.sh
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
DRY_RUN=${DRY_RUN:-no}
|
||||
|
||||
bool() {
|
||||
case "$1" in
|
||||
1|true|yes|on|TRUE|YES|ON) return 0 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
run() {
|
||||
if bool "$DRY_RUN"; then
|
||||
echo "DRY: + $*"
|
||||
else
|
||||
echo "+ $*"
|
||||
"$@"
|
||||
fi
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue