Ahenk/scripts/build-ahenk.sh

34 lines
856 B
Bash
Raw Normal View History

2016-06-07 15:26:16 +03:00
#!/bin/bash
###
# This script generates Ahenk package (ahenk.deb).
# Make sure you have debhelper & build-essential packages installed!
2016-06-07 15:26:16 +03:00
#
# Generated file can be found under /tmp/ahenk
###
2016-06-09 15:30:30 +03:00
set -e
2016-06-07 15:26:16 +03:00
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 -uc
2016-06-07 15:26:16 +03:00
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"