mirror of
https://github.com/lrenaud/IEEEtemplate.git
synced 2025-06-16 12:20:26 -07:00
19 lines
397 B
Bash
Executable file
19 lines
397 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Stuff everything in a backups directory on the local machine.
|
|
# Or, you could use git for your paper?
|
|
BAK=$(date +"%Y%m%d-%H%M")
|
|
BAK_DIR="backups/"
|
|
|
|
# Make it if we need it.
|
|
if [[ ! -e "${BAK_DIR}" ]]; then
|
|
mkdir -p "${BAK_DIR}"
|
|
fi
|
|
|
|
FOUT="${BAK_DIR}/backup_${BAK}.tar"
|
|
|
|
# Bundle it up.
|
|
tar --exclude "build/*" --exclude "backups" -cvf "$FOUT" .
|
|
xz -9v "$FOUT"
|
|
du -sh "${FOUT}.xz"
|
|
|