Skip to content
Snippets Groups Projects
Commit b649c79c authored by Tim O'Donnell's avatar Tim O'Donnell
Browse files

fix

parent 3b89017f
No related merge requests found
...@@ -21,10 +21,12 @@ else ...@@ -21,10 +21,12 @@ else
fi fi
# Send stdout and stderr to a logfile included with the archive. # Send stdout and stderr to a logfile included with the archive.
exec > >(tee -ia "$SCRATCH_DIR/$DOWNLOAD_NAME/LOG.txt") LOG="$SCRATCH_DIR/$DOWNLOAD_NAME/LOG.$(date +%s).txt"
exec 2> >(tee -ia "$SCRATCH_DIR/$DOWNLOAD_NAME/LOG.txt" >&2) exec > >(tee -ia "$LOG")
exec 2> >(tee -ia "$LOG" >&2)
# Log some environment info # Log some environment info
echo "Invocation: $0 $@"
date date
pip freeze pip freeze
git status git status
...@@ -79,7 +81,22 @@ do ...@@ -79,7 +81,22 @@ do
done done
cp $SCRIPT_ABSOLUTE_PATH . cp $SCRIPT_ABSOLUTE_PATH .
bzip2 LOG.txt bzip2 -f "$LOG"
for i in $(ls LOG-worker.*.txt) ; do bzip2 $i ; done for i in $(ls LOG-worker.*.txt) ; do bzip2 -f $i ; done
tar -cjf "../${DOWNLOAD_NAME}.tar.bz2" * RESULT="$SCRATCH_DIR/${DOWNLOAD_NAME}.$(date +%Y%m%d).tar.bz2"
echo "Created archive: $SCRATCH_DIR/${DOWNLOAD_NAME}.tar.bz2" tar -cjf "$RESULT" *
echo "Created archive: $RESULT"
# Split into <2GB chunks for GitHub
PARTS="${RESULT}.part."
# Check for pre-existing part files and rename them.
for i in $(ls "${PARTS}"* )
do
DEST="${i}.OLD.$(date +%s)"
echo "WARNING: already exists: $i . Moving to $DEST"
mv $i $DEST
done
split -b 2000M "$RESULT" "$PARTS"
echo "Split into parts:"
ls -lh "${PARTS}"*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment