diff --git a/build-all.sh b/build-all.sh index ed52d2b..842617b 100755 --- a/build-all.sh +++ b/build-all.sh @@ -2,5 +2,5 @@ BASE_DIR=$(cd `dirname "$0"`; pwd) -"$BASE_DIR/build-opentoonz-linux.sh" +"$BASE_DIR/build-opentoonz.sh" "$BASE_DIR/build-synfigstudio-linux.sh" diff --git a/build-opentoonz-linux.sh b/build-opentoonz-linux.sh deleted file mode 100755 index 99bccb9..0000000 --- a/build-opentoonz-linux.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -set -e - -BASE_DIR=$(cd `dirname "$0"`; pwd) -DATA_DIR="$BASE_DIR/docker-builder-data" -BUILD_DIR=$DATA_DIR/build -PUBLISH_DIR=$BASE_DIR/publish -CONFIG_FILE="$BASE_DIR/config.sh" -PACKET_BUILD_DIR="$BUILD_DIR/packet" -SCRIPT_BUILD_DIR="$BUILD_DIR/script" -if [ -f $CONFIG_FILE ]; then - source $CONFIG_FILE -fi - -SCRIPT="$BASE_DIR/docker/run.sh" - -run_appimage() { - export PLATFORM="$1" - export ARCH="$2" - - echo "" - echo "Update opentoonz for $PLATFORM-$ARCH" - echo "" - sudo $SCRIPT update opentoonz-master - sudo $SCRIPT clean_before_do install_release opentoonz-appimage - - "$PUBLISH_DIR/publish.sh" \ - "opentoonz" \ - "OpenToonz-%VERSION%-%DATE%-%COMMIT%-$PLATFORM-${ARCH}bits.appimage" \ - "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-appimage/install_release" \ - "*.appimage" \ - "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-appimage/envdeps_release/version-opentoonz-master" -} - -run_nsis() { - export PLATFORM="$1" - export ARCH="$2" - - echo "" - echo "Update opentoonz for $PLATFORM-$ARCH" - echo "" - sudo $SCRIPT update opentoonz-master - sudo $SCRIPT clean_before_do install_release opentoonz-nsis - - "$PUBLISH_DIR/publish.sh" \ - "opentoonz" \ - "OpenToonz-%VERSION%-%DATE%-%COMMIT%-$PLATFORM-${ARCH}bits.exe" \ - "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-nsis/install_release" \ - "*.exe" \ - "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-nsis/envdeps_release/version-opentoonz-master" -} - -run_appimage linux 64 -run_appimage linux 32 -run_nsis win 64 -#run_nsis win 32 diff --git a/build-opentoonz.sh b/build-opentoonz.sh new file mode 100755 index 0000000..99bccb9 --- /dev/null +++ b/build-opentoonz.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +set -e + +BASE_DIR=$(cd `dirname "$0"`; pwd) +DATA_DIR="$BASE_DIR/docker-builder-data" +BUILD_DIR=$DATA_DIR/build +PUBLISH_DIR=$BASE_DIR/publish +CONFIG_FILE="$BASE_DIR/config.sh" +PACKET_BUILD_DIR="$BUILD_DIR/packet" +SCRIPT_BUILD_DIR="$BUILD_DIR/script" +if [ -f $CONFIG_FILE ]; then + source $CONFIG_FILE +fi + +SCRIPT="$BASE_DIR/docker/run.sh" + +run_appimage() { + export PLATFORM="$1" + export ARCH="$2" + + echo "" + echo "Update opentoonz for $PLATFORM-$ARCH" + echo "" + sudo $SCRIPT update opentoonz-master + sudo $SCRIPT clean_before_do install_release opentoonz-appimage + + "$PUBLISH_DIR/publish.sh" \ + "opentoonz" \ + "OpenToonz-%VERSION%-%DATE%-%COMMIT%-$PLATFORM-${ARCH}bits.appimage" \ + "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-appimage/install_release" \ + "*.appimage" \ + "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-appimage/envdeps_release/version-opentoonz-master" +} + +run_nsis() { + export PLATFORM="$1" + export ARCH="$2" + + echo "" + echo "Update opentoonz for $PLATFORM-$ARCH" + echo "" + sudo $SCRIPT update opentoonz-master + sudo $SCRIPT clean_before_do install_release opentoonz-nsis + + "$PUBLISH_DIR/publish.sh" \ + "opentoonz" \ + "OpenToonz-%VERSION%-%DATE%-%COMMIT%-$PLATFORM-${ARCH}bits.exe" \ + "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-nsis/install_release" \ + "*.exe" \ + "$PACKET_BUILD_DIR/$PLATFORM-$ARCH/opentoonz-nsis/envdeps_release/version-opentoonz-master" +} + +run_appimage linux 64 +run_appimage linux 32 +run_nsis win 64 +#run_nsis win 32 diff --git a/docker/run.sh b/docker/run.sh index 1d68951..6f6bb71 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -2,10 +2,10 @@ SCRIPT_DIR=$(cd `dirname "$0"`; pwd) -if [ "$PLATFORM" -eq "win" ]; then - "$SCRIPT_DIR/fedora-cross-win/run.sh" -elif [ "$ARCH" -eq "32" ]; then - "$SCRIPT_DIR/debian-7-32bit/run.sh" +if [ "$PLATFORM" = "win" ]; then + "$SCRIPT_DIR/fedora-cross-win/run.sh" "$@" +elif [ "$ARCH" = "32" ]; then + "$SCRIPT_DIR/debian-7-32bit/run.sh" "$@" else - "$SCRIPT_DIR/debian-7-64bit/run.sh" + "$SCRIPT_DIR/debian-7-64bit/run.sh" "$@" fi diff --git a/publish/publish.sh b/publish/publish.sh old mode 100644 new mode 100755 index 316a766..48709b2 --- a/publish/publish.sh +++ b/publish/publish.sh @@ -4,14 +4,14 @@ set -e PUBLISH_DIR=$(cd `dirname "$0"`; pwd) -publish_file() { +publish() { local NAME="$1" local TEMPLATE="$2" # Xxxxx-%VERSION%-%DATE%-%COMMIT%-xxxxx.xxx" - local PATH="$3" + local FILEPATH="$3" local MASK="$4" local VERSION_FILE="$5" - local FILE=`ls "$PATH/"$MASK` + local FILE=`ls "$FILEPATH/"$MASK` local VERSION=`cat "$VERSION_FILE" | cut -d'-' -f 1` local COMMIT=`cat "$VERSION_FILE" | cut -d'-' -f 2-`