-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit_save
More file actions
executable file
·40 lines (34 loc) · 936 Bytes
/
git_save
File metadata and controls
executable file
·40 lines (34 loc) · 936 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
#!/usr/bin/env bash
echo "Start the git save process"
git_dir=(
"/home/dionisos/organisation/"
"/home/dionisos/.config/emacs"
"/home/dionisos/.config/emacs/private"
"/home/dionisos/scripts"
"/home/dionisos/projets/RD/tiddly_perso/"
"/home/dionisos/personnelle/private_config/"
"/home/dionisos/personnelle/administratif/"
)
for dir in "${git_dir[@]}"
do
name=$(basename "$dir")
cd "$dir" || exit 1
echo "$name"
dwim
# xonsh -DPROMPT="{env_name}{BOLD_GREEN}{user}@{hostname} $name $index/$total{BOLD_BLUE} {cwd}{branch_color}{curr_branch: {}}{RESET} {BOLD_BLUE}{prompt_end}{RESET} "
bash
(( "index+=1" ))
if [[ -f "/home/dionisos/abort_git_save" ]]
then
echo "Abort git_save"
rm "/home/dionisos/abort_git_save"
exit 1
fi
if [[ -f "/home/dionisos/finish_git_save" ]]
then
echo "Finished(git_save)"
rm "/home/dionisos/finish_git_save"
exit 0
fi
done
echo "Finished :-)"