forked from CGamesPlay/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArgcfile.sh
More file actions
executable file
·25 lines (22 loc) · 838 Bytes
/
Argcfile.sh
File metadata and controls
executable file
·25 lines (22 loc) · 838 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
#!/usr/bin/env bash
# @describe Helper scripts for managing the dotfiles.
set -eu
# @cmd Push the changes to the repository.
#
# This amends the latest commit to sign it, and uses --force-with-lease
push() {
if [ "$(git log -1 --pretty=format:"%G?" 2>/dev/null)" == "N" ]; then
git commit --amend -C HEAD -S
fi
git push git@gitlab.com:CGamesPlay/dotfiles.git master --force-with-lease=master:origin/master
git fetch origin
}
# @cmd Find files that maybe should be added to DFM.
find-unmanaged() {
echo "The following files are in directories controlled by DFM, but are not themselves in DFM."
find files -type d -not -name files \
| sed 's/^files/'$(echo ~ | sed 's/\//\\\//g')'/' \
| xargs -I {} find {} -maxdepth 1 -type f -not -name .DS_Store \
| grep -vE '.local/bin/|.ssh/id_'
}
eval "$(argc --argc-eval "$0" "$@")"