@@ -129,14 +129,14 @@ bm_end "$(basename $0) - Generating routes"
129
129
130
130
bm_start " $( basename $0 ) - Fetching routes"
131
131
ghe-ssh " $GHE_HOSTNAME " -- gzip -c $remote_routes_list | gzip -d > $routes_list
132
- cat $routes_list | ghe_debug
132
+ < $routes_list ghe_debug
133
133
bm_end " $( basename $0 ) - Fetching routes"
134
134
135
135
bm_start " $( basename $0 ) - Processing routes"
136
136
if [ " $GHE_BACKUP_STRATEGY " != " cluster" ]; then
137
137
server=$host
138
138
fi
139
- 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") }}'
139
+ < $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
140
ghe_debug " \n$( find " $tempdir " -maxdepth 1 -name ' *.rsync' ) "
141
141
bm_end " $( basename $0 ) - Processing routes"
142
142
@@ -324,7 +324,7 @@ bm_start "$(basename $0) - Repo sync"
324
324
for file_list in $tempdir /* .rsync; do
325
325
hostname=$( basename $file_list .rsync)
326
326
327
- repo_num=$( cat $file_list | wc -l)
327
+ repo_num=$( < $file_list wc -l)
328
328
ghe_verbose " * Transferring $repo_num repositories from $hostname "
329
329
330
330
sync_data $hostname $file_list &
@@ -366,7 +366,9 @@ bm_end "$(basename $0) - Special Data Directories Sync"
366
366
367
367
if [ -z " $GHE_SKIP_ROUTE_VERIFICATION " ]; then
368
368
bm_start " $( basename $0 ) - Verifying Routes"
369
- cat $tempdir /* .rsync | uniq | sort | uniq > $tempdir /source_routes
369
+ for file_lst in $tempdir /* .rsync; do
370
+ < $file_lst sort | uniq
371
+ done | sort| uniq > $tempdir /source_routes
370
372
(cd $backup_dir / && find * -mindepth 5 -maxdepth 6 -type d -name \* .git | fix_paths_for_ghe_version | uniq | sort | uniq) > $tempdir /destination_routes
371
373
372
374
git --no-pager diff --unified=0 --no-prefix -- $tempdir /source_routes $tempdir /destination_routes || echo " Warning: One or more repository networks and/or gists were not found on the source appliance. Please contact GitHub Enterprise Support for assistance."
0 commit comments