add ahenk build script

This commit is contained in:
emre.akkaya 2016-06-07 15:26:16 +03:00
parent f87cb94a9a
commit 86d0e296a4
2 changed files with 44 additions and 0 deletions

31
scripts/build-ahenk.sh Executable file
View file

@ -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"

13
scripts/update-ahenk.sh Executable file
View file

@ -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