Skip to content

Commit

Permalink
use fixed prefix for tmp tarball and compress it
Browse files Browse the repository at this point in the history
  • Loading branch information
truib committed Sep 18, 2024
1 parent 1fc4c42 commit 028e57e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eessi_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -846,14 +846,14 @@ if [[ ! -z ${SAVE} ]]; then
# of these aspects to where the script is used
if [[ -d ${SAVE} ]]; then
# assume SAVE is name of a directory to which tarball shall be written to
# name format: {REPO_ID}-{TIMESTAMP}.tgz
# name format: tmp_storage-{TIMESTAMP}.tgz
ts=$(date +%s)
TGZ=${SAVE}/${REPOSITORY}-${ts}.tgz
TGZ=${SAVE}/tmp_storage-${ts}.tgz
else
# assume SAVE is the full path to a tarball's name
TGZ=${SAVE}
fi
tar cf ${TGZ} -C ${EESSI_TMPDIR} .
tar czf ${TGZ} -C ${EESSI_TMPDIR} .
echo "Saved contents of tmp directory '${EESSI_TMPDIR}' to tarball '${TGZ}' (to resume session add '--resume ${TGZ}')"
fi

Expand Down

0 comments on commit 028e57e

Please sign in to comment.