File: configure

package info (click to toggle)
trayer 1.1.8-4.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 296 kB
  • sloc: ansic: 2,384; makefile: 40; sh: 21
file content (28 lines) | stat: -rwxr-xr-x 491 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/env bash

PREFIX=/usr

if [ ! -z "$1" ]; then
  if [[ "$1" =~ ^--prefix= ]]; then
    PREFIX=$(echo $1 | cut -d= -f2)
  else
    echo "Usage: $0 [--prefix=<path>]"
    exit 1
  fi
fi

if [ -f config.h ]; then
  echo "overwriting old config.h..."
fi
cat > config.h <<EOF
/* created by ./configure */
#define PREFIX $PREFIX
EOF

if [ -f Makefile.config ]; then
  echo "overwriting old Makefile.config..."
fi
cat > Makefile.config <<EOF
# created by ./configure
PREFIX = $PREFIX
EOF