Skip to content

Commit 267dcac

Browse files
authored
Merge branch 'master' into lildude/update-verify-routes
2 parents eb81c28 + cdd99a6 commit 267dcac

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

share/github-backup-utils/ghe-backup-repositories

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ if [ "$GHE_BACKUP_STRATEGY" != "cluster" ]; then
137137
server=$host
138138
fi
139139
cat $routes_list | awk -v tempdir="$tempdir" -v server="$server" '{ for(i=2;i<=NF;i++){ server != "" ? host=server : host=$i; print $1 > (tempdir"/"host".rsync") }}'
140-
ghe_debug "\n$(ls -l $tempdir/*.rsync)"
140+
ghe_debug "\n$(find "$tempdir" -maxdepth 1 -name '*.rsync')"
141141
bm_end "$(basename $0) - Processing routes"
142142

143-
if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
143+
if [ -z "$(find "$tempdir" -maxdepth 1 -name '*.rsync')" ]; then
144144
echo "Warning: no routes found, skipping repositories backup ..."
145145
exit 0
146146
fi

share/github-backup-utils/ghe-backup-storage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ if [ "$GHE_BACKUP_STRATEGY" != "cluster" ]; then
105105
server=$host
106106
fi
107107
cat $routes_list | awk -v tempdir="$tempdir" -v server="$server" '{ for(i=2;i<=NF;i++){ server != "" ? host=server : host=$i; print $1 > (tempdir"/"host".rsync") }}'
108-
ghe_debug "\n$(ls -l $tempdir/*.rsync)"
108+
ghe_debug "\n$(find "$tempdir" -maxdepth 1 -name '*.rsync')"
109109
bm_end "$(basename $0) - Processing routes"
110110

111-
if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
111+
if [ -z "$(find "$tempdir" -maxdepth 1 -name '*.rsync')" ]; then
112112
echo "Warning: no routes found, skipping storage backup ..."
113113
exit 0
114114
fi

share/github-backup-utils/ghe-restore-pages

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ bm_end "$(basename $0) - Fetching routes"
119119

120120
bm_start "$(basename $0) - Processing routes"
121121
cat $routes_list | awk -v tempdir="$tempdir" '{ for(i=2;i<=NF;i++){ print $1 > (tempdir"/"$i".rsync") }}'
122-
ghe_debug "\n$(ls -l $tempdir/*.rsync)"
122+
ghe_debug "\n$(find "$tempdir" -maxdepth 1 -name '*.rsync')"
123123
bm_end "$(basename $0) - Processing routes"
124124

125-
if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
125+
if [ -z "$(find "$tempdir" -maxdepth 1 -name '*.rsync')" ]; then
126126
echo "Warning: no routes found, skipping pages restore ..."
127127
exit 0
128128
fi

share/github-backup-utils/ghe-restore-repositories

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ bm_end "$(basename $0) - Fetching routes"
129129
bm_start "$(basename $0) - Processing routes"
130130
cat $routes_list | awk -v tempdir="$tempdir" '{ for(i=2;i<=NF;i++){ print $1 > (tempdir"/"$i".rsync") }}'
131131
cat $routes_list | awk '{ n = split($1, p, "/"); printf p[n] " /data/repositories/" $1; $1=""; print $0}' > $to_restore
132-
ghe_debug "\n$(ls -l $tempdir/*.rsync && cat $to_restore)"
132+
ghe_debug "\n$(find "$tempdir" -maxdepth 1 -name '*.rsync')"
133133
bm_end "$(basename $0) - Processing routes"
134134

135-
if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
135+
if [ -z "$(find "$tempdir" -maxdepth 1 -name '*.rsync')" ]; then
136136
echo "Warning: no routes found, skipping repositories restore ..."
137137
exit 0
138138
fi

share/github-backup-utils/ghe-restore-repositories-gist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ bm_end "$(basename $0) - Transferring routes"
122122
bm_start "$(basename $0) - Processing routes"
123123
cat $routes_list | awk -v tempdir="$tempdir" '{ for(i=2;i<=NF;i++){ print $1 > (tempdir"/"$i".rsync") }}'
124124
cat $routes_list | awk '{ n = split($1, p, "/"); i = p[n]; sub(/\.git/, "", i); printf i " /data/repositories/" $1; $1=""; print $0}' > $to_restore
125-
ghe_debug "\n$(ls -l $tempdir/*.rsync && cat $to_restore)"
125+
ghe_debug "\n$(find "$tempdir" -maxdepth 1 -name '*.rsync')"
126126
bm_end "$(basename $0) - Processing routes"
127127

128-
if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
128+
if [ -z "$(find "$tempdir" -maxdepth 1 -name '*.rsync')" ]; then
129129
echo "Warning: no routes found, skipping gists restore ..."
130130
exit 0
131131
fi

share/github-backup-utils/ghe-restore-storage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ bm_end "$(basename $0) - Fetching routes"
111111

112112
bm_start "$(basename $0) - Processing routes"
113113
cat $routes_list | awk -v tempdir="$tempdir" '{ for(i=2;i<=NF;i++){ print substr($1,1,1) "/" substr($1,1,2) "/" substr($1,3,2) "/" $1 > (tempdir"/"$i".rsync") }}'
114-
ghe_debug "\n$(ls -l $tempdir/*.rsync)"
114+
ghe_debug "\n$(find "$tempdir" -maxdepth 1 -name '*.rsync')"
115115
bm_end "$(basename $0) - Processing routes"
116116

117-
if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
117+
if [ -z "$(find "$tempdir" -maxdepth 1 -name '*.rsync')" ]; then
118118
echo "Warning: no routes found, skipping storage restore ..."
119119
exit 0
120120
fi

0 commit comments

Comments
 (0)