Initial Commit

This commit is contained in:
Didier Slof 2022-12-16 14:23:28 +01:00
commit fb9e4f9eff
Signed by: didier
GPG key ID: 01E71F18AA4398E5
18 changed files with 564 additions and 0 deletions

16
lib/deploy.sh Normal file
View 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
View 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
}