Skip to content

Commit

Permalink
Add autobuild scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sylvain Desse committed Sep 24, 2014
1 parent d047018 commit ae6628a
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 0 deletions.
12 changes: 12 additions & 0 deletions autobuild/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

source autobuild/vars.sh
source autobuild/includes.sh

cd "$MAKEDIR"
_run make all

exit 0
18 changes: 18 additions & 0 deletions autobuild/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#! /bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

source autobuild/vars.sh
source autobuild/includes.sh

### Cleanup
_run rm -rf "$MAKEDIR"

### Configure
_run mkdir -p "$MAKEDIR"
cd "$MAKEDIR"
_run cmake -DCMAKE_INSTALL_PREFIX=/usr "$ROOT"

### Success
exit 0
14 changes: 14 additions & 0 deletions autobuild/includes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

_run() {
echo $*
$*
if [ $? != 0 ]
then
echo "Error"
exit 1
fi
}
20 changes: 20 additions & 0 deletions autobuild/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

source autobuild/vars.sh
source autobuild/includes.sh

cd "$MAKEDIR"

### Build package
_run make package

if [ -n "$DROPDIR" ]; then
### Copy to destination
_run mkdir -p "$DROPDIR/"
_run cp hakabana*.tar.gz "$DROPDIR/"
fi

exit 0
9 changes: 9 additions & 0 deletions autobuild/vars.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

export PATH=/bin:/usr/bin:/usr/local/bin
export ROOT=$(pwd)
export MAKEDIR="$ROOT/workspace/"

0 comments on commit ae6628a

Please sign in to comment.