File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
share/github-backup-utils Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,12 @@ for f in "$GHE_BACKUP_CONFIG" "$GHE_BACKUP_ROOT/backup.config" \
143
143
fi
144
144
done
145
145
146
+ # If we don't have a readlink command, error out
147
+ [ ! type readlink 1> /dev/null 2>&1 ] && {
148
+ echo " Error: readlink not found. Please install readlink and ensure it is in your PATH." 1>&2
149
+ exit 1
150
+ }
151
+
146
152
GHE_RESTORE_IN_PROGRESS=$( readlink -fm " ${GHE_DATA_DIR} /in-progress-restore" )
147
153
GHE_BACKUP_IN_PROGRESS=$( readlink -fm " ${GHE_DATA_DIR} /in-progress-backup" )
148
154
@@ -401,17 +407,6 @@ ghe_remote_version_config() {
401
407
# ##############################################################################
402
408
# ## Utility functions
403
409
404
- # If we don't have a readlink command, parse ls -l output.
405
- if ! type readlink 1> /dev/null 2>&1 ; then
406
- readlink () {
407
- if [ -x " $1 " ]; then
408
- ls -ld " $1 " | sed ' s/.*-> //'
409
- else
410
- return 1
411
- fi
412
- }
413
- fi
414
-
415
410
# Run ghe-host-check and establish the version of the remote GitHub instance in
416
411
# the exported GHE_REMOTE_VERSION variable. If the remote version has already
417
412
# been established then don't perform the host check again. Utilities in share/github-backup-utils
You can’t perform that action at this time.
0 commit comments