Skip to content

Commit

Permalink
add --makereadme option to parkit_tarball2hpcdme & fix #21
Browse files Browse the repository at this point in the history
  • Loading branch information
kopardev committed Sep 26, 2024
1 parent 7d619de commit 0f656b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/parkit/scripts/parkit_folder2hpcdme
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ README="${FOLDER}.README"
if [[ "${CLEANUP}" == "yes" ]];then
for f in "${TARBALL}"* *response-header.tmp *response-message.json.tmp
do
if [ "$f" != "${TARBALL}.filelist" ];then
if [[ "$f" != "${TARBALL}.filelist" ]];then
rm -iv $f
fi
done
Expand Down
9 changes: 8 additions & 1 deletion src/parkit/scripts/parkit_tarball2hpcdme
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ parser.add_argument('--dest',required=False, help='vault collection path (Analys
parser.add_argument('--projectdesc',required=False, help='project description')
parser.add_argument('--projecttitle',required=False, help='project title')
parser.add_argument('--cleanup',action='store_true', help='post transfer step to delete local files')
parser.add_argument('--makereadme',action='store_true', help='make readme file with destination location on vault')
parser.add_argument('--hpcdmutilspath', required=True, help='what should be the value of env var HPC_DM_UTILS')
parser.add_argument('--version',action='store_true', help='print version')
EOF
Expand All @@ -100,11 +101,14 @@ if [ ! -f "${TARBALL}" ];then
echo "${TARBALL} does not exist!"
exit 1
fi
README="${TARBALL}.README"
# cleanup option
if [[ "${CLEANUP}" == "yes" ]];then
for f in "${TARBALL}"* *response-header.tmp *response-message.json.tmp
do
rm -iv $f
if [[ "${TARBALL}.filelist" != "${f}" ]];then
rm -iv $f
fi
done
exit 0
fi
Expand Down Expand Up @@ -252,5 +256,8 @@ echo "############# Running deposittar ###############################"
jobids="$jobids:$jid"
fi
fi
if [[ "${MAKEREADME}" == "yes" ]];then
echo "${TARBALL} parked at ${DEST} on HPCDME!" >> "${README}"
fi
echo "################################################################"
fi # RUN_deposittar ends

0 comments on commit 0f656b5

Please sign in to comment.