From 86d0e296a47fc30e20bc96eb6cd5921ac0f6f2f1 Mon Sep 17 00:00:00 2001 From: "emre.akkaya" Date: Tue, 7 Jun 2016 15:26:16 +0300 Subject: [PATCH 1/2] add ahenk build script --- scripts/build-ahenk.sh | 31 +++++++++++++++++++++++++++++++ scripts/update-ahenk.sh | 13 +++++++++++++ 2 files changed, 44 insertions(+) create mode 100755 scripts/build-ahenk.sh create mode 100755 scripts/update-ahenk.sh diff --git a/scripts/build-ahenk.sh b/scripts/build-ahenk.sh new file mode 100755 index 0000000..7a8fe9c --- /dev/null +++ b/scripts/build-ahenk.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +### +# This script builds the project and generates Ahenk distribution (ahenk.deb) +# +# Generated file can be found under /tmp/ahenk +### + +pushd $(dirname $0) > /dev/null +PRJ_ROOT_PATH=$(dirname $(pwd -P)) +popd > /dev/null +echo "Project path: $PRJ_ROOT_PATH" + +# Generate Ahenk packages +echo "Generating Ahenk packages..." +cd "$PRJ_ROOT_PATH" +dpkg-buildpackage -b +echo "Generated Ahenk packages" + +EXPORT_PATH=/tmp/ahenk +echo "Export path: $EXPORT_PATH" + +# Copy resulting files +echo "Copying generated Ahenk packages to $EXPORT_PATH..." +mkdir -p "$EXPORT_PATH" +cp -rf "$PRJ_ROOT_PATH"/../ahenk*.deb "$EXPORT_PATH" +cp -rf "$PRJ_ROOT_PATH"/../ahenk*.changes "$EXPORT_PATH" +echo "Copied generated Ahenk packages." + +echo "Built finished successfully!" +echo "Files can be found under: $EXPORT_PATH" diff --git a/scripts/update-ahenk.sh b/scripts/update-ahenk.sh new file mode 100755 index 0000000..ca015d7 --- /dev/null +++ b/scripts/update-ahenk.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +### +# This script updates the local repo with the latest changes from Github. +# +# The master branch will be REPLACED with what's in Github and all local changes +# will be LOST. +### + +git checkout master +git fetch -f origin +git fetch --tags origin +git reset --hard origin/master From f31ebf75abf12d19ce2c1caaab9bfaf5e5ebfd17 Mon Sep 17 00:00:00 2001 From: "emre.akkaya" Date: Tue, 7 Jun 2016 16:41:56 +0300 Subject: [PATCH 2/2] update build script --- scripts/build-ahenk.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-ahenk.sh b/scripts/build-ahenk.sh index 7a8fe9c..4ecda1a 100755 --- a/scripts/build-ahenk.sh +++ b/scripts/build-ahenk.sh @@ -1,7 +1,7 @@ #!/bin/bash ### -# This script builds the project and generates Ahenk distribution (ahenk.deb) +# This script generates Ahenk package (ahenk.deb) # # Generated file can be found under /tmp/ahenk ###