File: build-funcs.sh

package info (click to toggle)
popplerkit.framework 0.0.20051227svn-16
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,632 kB
  • sloc: objc: 2,303; cpp: 672; sh: 475; ansic: 55; makefile: 29
file content (30 lines) | stat: -rw-r--r-- 666 bytes parent folder | download | duplicates (9)
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 
}