Skip to content

Commit d4c7dd9

Browse files
committed
make super-linter happy
1 parent a0a1a9f commit d4c7dd9

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.shellcheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
disable=SC2002 #useless cat

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ import_tool_available() {
2222
}
2323

2424
ghe_ssh_mssql() {
25-
ghe-ssh $opts $ssh_config_file_opt "$GHE_MSSQL_PRIMARY_HOST" "$@"
25+
ghe-ssh "$opts" "$ssh_config_file_opt" "$GHE_MSSQL_PRIMARY_HOST" "$@"
2626
}
2727

2828
cleanup() {
29-
rm -rf $tempdir
29+
rm -rf "$tempdir"
3030
}
3131
trap 'cleanup' EXIT INT
3232

@@ -65,7 +65,7 @@ ghe_remote_version_required "$GHE_HOSTNAME"
6565

6666
# The snapshot to restore should be set by the ghe-restore command but this lets
6767
# us run this script directly.
68-
: ${GHE_RESTORE_SNAPSHOT:=current}
68+
: "${GHE_RESTORE_SNAPSHOT:=current}"
6969

7070
# The directory holding the snapshot to restore
7171
snapshot_dir_mssql="$GHE_DATA_DIR/$GHE_RESTORE_SNAPSHOT/mssql"
@@ -79,13 +79,13 @@ do
7979

8080
filename="${b##*/}"
8181
ghe_verbose "Transferring $filename to appliance host"
82-
cat $snapshot_dir_mssql/$filename | ghe_ssh_mssql "sudo tee -a $appliance_dir/$filename >/dev/null 2>&1"
82+
cat "$snapshot_dir_mssql/$filename" | ghe_ssh_mssql "sudo tee -a $appliance_dir/$filename >/dev/null 2>&1"
8383
done
8484

8585
# Change owner to mssql:mssql to ready for restore
8686
ghe_ssh_mssql "sudo chown -R mssql:mssql $appliance_dir"
8787

8888
# Invoke restore command
89-
bm_start "$(basename $0)"
89+
bm_start "$(basename "$0")"
9090
ghe_ssh_mssql -- "ghe-import-mssql" < "/dev/null" 1>&3
91-
bm_end "$(basename $0)"
91+
bm_end "$(basename "$0")"

0 commit comments

Comments
 (0)