forked from cyphunk/sectk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sectk
executable file
·54 lines (52 loc) · 1.17 KB
/
sectk
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
49
50
51
52
53
54
#!/bin/bash
# Add files to sectk
#
# who wants to cp -a anyway? I put this script in my path
# to help update and manage the repository.
export GITDIR="/Users/cyphunk/sectk";
case "$1" in
add)
# default add
$0 often $2
;;
often)
cp -R $2 $GITDIR/often/.
;;
unoften)
cp -R $2 $GITDIR/unoften/.
;;
inreview)
cp -R $2 $GITDIR/inreview/.
;;
update)
cd $GITDIR && \
git add * && \
git commit -a -m "$2" && \
git push origin master
;;
cleanosx)
find $2 -name .DS_Store -exec rm {} \;
echo "showing all remaining . files (only .DS_Store should have been deleted)"
find $2 -name .\*
;;
cleanalldot)
find $2 -name .\* -exec rm {} \;
find $2 -name .\*
;;
*)
echo "Usage: $0 {add|often|unoften|inreview|update} {directory|comment}"
echo ""
echo " directory should be without trailing / "
echo ""
echo " often/add add file to sektk/often and update git"
echo " unoften add file to sektk/unoften and update git"
echo " inreview add file to sektk/often and update git"
echo " update update git repository with comment"
echo ""
echo " cleanosx remove all .DS_Store files"
echo " cleanalldot careful! removes all dot files"
echo ""
exit 1
;;
esac
exit 0