File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,12 @@ set -o errtrace
3
3
set -o nounset
4
4
5
5
6
- BASE=" ${0%/* } "
6
+ function _change_to_repo_dir {
7
+ cd " ${0%/* } /.." > /dev/null
8
+ }
7
9
8
10
9
- _mirror () {
11
+ function _mirror {
10
12
# Note: the --mirror option is equivalent to:
11
13
# --recursive
12
14
# --timestamping
@@ -38,31 +40,31 @@ prep() {
38
40
}
39
41
40
42
41
- _2017_root () {
43
+ function _2017_root {
42
44
printf " \e[1m\e[7m %-80s\e[0m\n" ' Mirroring 2017 State of the Commons'
43
45
# Mirror
44
46
_mirror /
45
47
echo
46
48
}
47
49
48
50
49
- _2016_subdir () {
51
+ function _2016_subdir {
50
52
printf " \e[1m\e[7m %-80s\e[0m\n" ' Mirroring 2016 State of the Commons'
51
53
# Mirror
52
54
_mirror /2016/
53
55
echo
54
56
}
55
57
56
58
57
- _2015_subdir () {
59
+ function _2015_subdir {
58
60
printf " \e[1m\e[7m %-80s\e[0m\n" ' Mirroring 2015 State of the Commons'
59
61
# Mirror
60
62
_mirror /2015/
61
63
echo
62
64
}
63
65
64
66
65
- _cleanup () {
67
+ function _cleanup {
66
68
printf " \e[1m\e[7m %-80s\e[0m\n" ' Performing clean-up on mirror'
67
69
if [[ -d stateof.creativecommons.org ]]
68
70
then
@@ -78,8 +80,7 @@ _cleanup() {
78
80
}
79
81
80
82
81
- cd " ${BASE} /.." > /dev/null
82
-
83
+ _change_to_repo_dir # must be called first
83
84
_prep
84
85
_2017_root
85
86
_2016_subdir
You can’t perform that action at this time.
0 commit comments