2016-11-30 02:44:41 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-11-30 02:51:59 +01:00
|
|
|
VERSION=$(echo "$(./convmlv.sh -v)" | sed -e 's/\./\_/g')
|
2016-12-09 06:36:50 +01:00
|
|
|
TYPE=$1
|
|
|
|
|
|
|
|
if [[ -z "${TYPE// }" ]]; then TYPE="examples"; fi
|
2016-11-30 02:44:41 +01:00
|
|
|
|
|
|
|
#HOW TO USE (Linux and Mac):
|
2016-12-09 04:37:22 +01:00
|
|
|
# 1. Make sure everything is up to date.
|
|
|
|
# 2. Put mlv2badpixels.sh, mlv_dump, raw2dng, and cr2hdr into the "binaries" folder in the repository.
|
2016-12-09 06:36:50 +01:00
|
|
|
# 4. Run the script with "bare" or "examples" as argument. "examples" is default.
|
2016-12-09 04:37:22 +01:00
|
|
|
# 3. A release tarball will automatically be created in "release" in the repository.
|
2016-11-30 02:44:41 +01:00
|
|
|
|
|
|
|
## It's reccommended that BINPATH is a folder in REP_PATH.
|
|
|
|
|
|
|
|
REP_PATH="$(pwd)"
|
|
|
|
BINPATH="${REP_PATH}/binaries"
|
2016-12-06 06:56:08 +01:00
|
|
|
SRCPATH="${REP_PATH}/src"
|
2016-12-09 04:37:22 +01:00
|
|
|
DOCPATH="${REP_PATH}/docs"
|
2016-11-30 02:44:41 +01:00
|
|
|
RELEASE="${REP_PATH}/release"
|
|
|
|
|
|
|
|
mkdir -p "$RELEASE"
|
|
|
|
|
2016-12-31 18:55:52 +01:00
|
|
|
#Determine Platform
|
2016-11-30 02:44:41 +01:00
|
|
|
if [[ $OSTYPE == "linux-gnu" ]]; then
|
|
|
|
PLATFORM="linux"
|
2016-12-31 18:55:52 +01:00
|
|
|
elif [[ $OSTYPE == "darwin11" || $OSTYPE == "darwin15" ]]; then
|
2016-11-30 02:44:41 +01:00
|
|
|
PLATFORM="mac"
|
|
|
|
else
|
|
|
|
echo "Platform not yet supported! Contact me at contact@sofusrose.com."
|
|
|
|
fi
|
|
|
|
|
2016-12-09 06:36:50 +01:00
|
|
|
TARBALL="$RELEASE/convmlv-${VERSION}-${PLATFORM}.tar.gz"
|
|
|
|
|
2016-12-31 18:55:52 +01:00
|
|
|
#Build Docs
|
2016-12-09 04:37:22 +01:00
|
|
|
$DOCPATH/cleanDocs.sh > /dev/null
|
|
|
|
$DOCPATH/buildDocs.sh > /dev/null
|
|
|
|
|
2016-12-31 18:55:52 +01:00
|
|
|
#Make tarball
|
2016-12-06 06:56:08 +01:00
|
|
|
cd $REP_PATH
|
2016-12-09 06:36:50 +01:00
|
|
|
case $TYPE in
|
|
|
|
examples)
|
|
|
|
tar -czvf "$TARBALL" binaries/ src/ CHANGELOG 7D_badpixels.txt licence convmlv.sh \
|
|
|
|
color-core/ color-ext docs/MANPAGE docs/docs.pdf docs/workflow.txt configs/*
|
|
|
|
;;
|
|
|
|
bare)
|
|
|
|
tar -czvf "$TARBALL" binaries/ src/ CHANGELOG licence convmlv.sh \
|
|
|
|
color-core/ color-ext docs/MANPAGE docs/docs.pdf
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2016-12-31 18:55:52 +01:00
|
|
|
#Sign & Verify
|
2016-12-09 06:36:50 +01:00
|
|
|
gpg -b "$TARBALL"
|
2016-12-09 04:37:22 +01:00
|
|
|
|
|
|
|
$DOCPATH/cleanDocs.sh > /dev/null
|
2016-12-09 06:36:50 +01:00
|
|
|
|
|
|
|
gpg --verify "${TARBALL}.sig" "$TARBALL"
|