File: build-funcs.sh

package info (click to toggle)
popplerkit.framework 0.0.20051227svn-6
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,396 kB
  • ctags: 120
  • sloc: objc: 2,303; sh: 914; cpp: 574; ansic: 55; makefile: 24
file content (30 lines) | stat: -rw-r--r-- 666 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# common functions for building 3rdParty stuff

# call with $@ from including script
build_init() {
   PREFIX=${1}
   if [ -z "${PREFIX}" ]; then
      echo "first parameter must be install prefix"
      return 1
   fi
   
   ARTIFACT_DIR=${2}
   if [ -z "${ARTIFACT_DIR}" ]; then
      echo "second parameter must be the artifact's build directory"
      return 1
   fi
   if [ ! -d "${ARTIFACT_DIR}" ]; then
      echo "${ARTIFACT_DIR} not found"
      return 1
   fi

   return 0
}

# emit an error message and exit with retcode 1 if the first parameter is non-zero
build_exit_if_failed() {
   if [ $1 -ne 0 ]; then
      echo "BUILD FAILED"
      exit 1
   fi 
}