-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile
More file actions
executable file
·48 lines (35 loc) · 866 Bytes
/
Taskfile
File metadata and controls
executable file
·48 lines (35 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
set -euo pipefail
script_dir="$(dirname "${BASH_SOURCE[0]}")"
source "$script_dir/dotconfig/zsh/xdg-cleanup"
source "$script_dir/dotconfig/zsh/zsh-exports"
cd "$(dirname "$0")"
init() {
echo "Initializing submodules..."
git submodule init
git submodule update
if [ ! -d "$XDG_SRC_DIR/dotfiles-public" ]; then
echo "Cloning public repo..."
git clone git@github.com:sarmong/dotfiles.git "$XDG_SRC_DIR/dotfiles-public"
fi
echo "Adding hooks..."
git config --local core.hooksPath .gitconfig/hooks
echo "Intalling required ansible collections..."
ansible-galaxy install -r ansible/requirements.yml
echo "Done."
}
update() {
git stash
git pull
make ansible
}
ansible() {
scripts/ansible.sh "$@"
}
ansible-check() {
scripts/ansible.sh --check "$@"
}
sync-public() {
scripts/sync-repos.sh "$@"
}
"$@"