#!/bin/sh # Directories prefix=@prefix@ datarootdir=@datarootdir@ datadir=@datadir@ templatedir=@datadir@/vine-manual-skel/template # My name MYNAME=`basename $0` # print usage print_usage() { cat << EOM ${MYNAME} Initialize package of manual for Vine Linux. Usage: ${MYNAME} [OPTION]... PACAGE-NAME -d, --docdir change install directory name instead of package name --help display help and exit --version output version information and exit EOM } # print version print_version() { cat << EOM ${MYNAME} @VERSION@ Copyright (C) 2011 Project Vine. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Yasumichi Akahoshi EOM } # # parse arguments. # if [ -z "$*" ]; then print_usage exit 1 fi while [ ! -z "$*" ]; do case $1 in -d|--docdir) DOCDIR=$2 shift ;; --help) print_usage exit ;; --version) print_version exit ;; *) if [ -z "${TARGET}" ]; then TARGET=$1 else echo "Too many targets." >&2 echo >&2 print_usage exit 1 fi ;; esac shift done