Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 52 lines (43 sloc) 0.935 kb
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
#!/bin/sh

usage() {
cat <<EOF
\`$0' configures ns_server to adapt to many kinds of systems.

Usage: $0 [OPTION]...

Configuration:
-h, --help display this help and exit

Installation directories:
--prefix=PREFIX install files in PREFIX (required)

EOF
}

prefix=
for config_arg do
  case "$config_arg" in
      --help|-h)
          usage
          exit 0
          ;;
      --prefix=/*)
          prefix=${config_arg##--prefix=}
          ;;
      --prefix=*)
          echo "--prefix needs to be absolute path"
          exit 1
          ;;
      *)
          echo "Unkown option: ${config_arg}"
          exit 1
          ;;
  esac
done

if test -z "$prefix" ; then
    usage
    echo "Error: --prefix option is required"
    exit 1
fi

cat <<EOF >${0%"${0##*/}"}/.configuration
prefix=$prefix
EOF

echo
echo "Membase management server is configured and is ready to be built!"
echo "PREFIX: ${prefix}"
echo
Something went wrong with that request. Please try again.