Skip to content

Commit

Permalink
Update transfer.sh to accept number of files
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed May 8, 2024
1 parent d043e3f commit 0724033
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions hack/ccp/hack/transfer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ set -x
__dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

transfer=$(mktemp -d)

cp $__dir/processingMCP.xml $transfer
touch $transfer/hello.txt
touch $transfer/bye.txt

num_files=$1
if [[ ! "$num_files" =~ ^[0-9]+$ ]]; then
touch "$transfer/hello.txt"
touch "$transfer/bye.txt"
else
for (( i=0; i<num_files; i++ )); do
mktemp --tmpdir="$transfer" XXXXXXXX.txt
done
fi


mv $transfer ~/.ccp/am-pipeline-data/watchedDirectories/activeTransfers/standardTransfer/

0 comments on commit 0724033

Please sign in to comment.