Skip to content

Commit

Permalink
(Incidentally) organize the variables
Browse files Browse the repository at this point in the history
  • Loading branch information
skomma committed Apr 23, 2019
1 parent 6855b2a commit ebc2895
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bin/restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ TAR_OPTS="jxvf"
DIRNAME=`/usr/bin/dirname ${TARGET}`
BASENAME=`/usr/bin/basename ${TARGET}`
TARBALL_FULLPATH="${TMPDIR}/${TARGET_FILE}"

S3_TARBALL_FULLURL=${TARGET_BUCKET_URL}${TARGET_FILE}
GS_TARBALL_FULLURL=${TARGET_BUCKET_URL}${TARGET_FILE}
TARBALL_FULLURL=${TARGET_BUCKET_URL}${TARGET_FILE}

# check parameters
if [ "x${TARGET_BUCKET_URL}" == "x" ]; then
Expand All @@ -37,9 +35,9 @@ fi

if [ `echo $TARGET_BUCKET_URL | cut -f1 -d":"` == "s3" ]; then
# download tarball from Amazon S3
s3_copy_file ${S3_TARBALL_FULLURL} ${TARBALL_FULLPATH}
s3_copy_file ${TARBALL_FULLURL} ${TARBALL_FULLPATH}
elif [ `echo $TARGET_BUCKET_URL | cut -f1 -d":"` == "gs" ]; then
gs_copy_file ${GS_TARBALL_FULLURL} ${TARBALL_FULLPATH}
gs_copy_file ${TARBALL_FULLURL} ${TARBALL_FULLPATH}
fi

# run tar command
Expand Down

0 comments on commit ebc2895

Please sign in to comment.