-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
096a72f
commit c5e72ca
Showing
1 changed file
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
#!/bin/bash | ||
|
||
# Script for creating a single compressed archive, after download_dependencies.sh | ||
# Script for creating a single compressed deployment archive, once download_dependencies.sh | ||
# has been executed. | ||
# It will create an archive in the $TARGET_DIRECTORY, named $ARCHIVE_NAME. | ||
# It will create an archive named $ARCHIVE_NAME using the files in $SOURCE_DIRECTORY, | ||
# stored in $TARGET_DIRECTORY. | ||
|
||
set -ex | ||
|
||
SOURCE_DIRECTORY="." | ||
TARGET_DIRECTORY="/tmp/dqmgui" | ||
ARCHIVE_NAME="dqmgui_installation_package.tar.gz" | ||
|
||
# Parse command line arguments -- use <key>=<value> to override the flags mentioned above. | ||
# e.g. ARCHIVE_NAME="test.tar.gz" | ||
for ARGUMENT in "$@"; do | ||
KEY=$(echo "$ARGUMENT" | cut -f1 -d=) | ||
KEY_LENGTH=${#KEY} | ||
VALUE="${ARGUMENT:$KEY_LENGTH+1}" | ||
eval "$KEY=$VALUE" | ||
done | ||
|
||
mkdir -p "$TARGET_DIRECTORY" | ||
tar --exclude "./git" --exclude "./github" -cf "$TARGET_DIRECTORY/$ARCHIVE_NAME" . -I "gzip --best" | ||
tar --exclude "./git" --exclude "./github" -cf "$TARGET_DIRECTORY/$ARCHIVE_NAME" "$SOURCE_DIRECTORY" -I "gzip --best" |