3 ## Copyright (C) 2006 - 2011 Steve Youngs
5 ## Author: Steve Youngs <steve@steveyoungs.com>
6 ## Maintainer: Steve Youngs <steve@steveyoungs.com>
7 ## Created: <2006-08-16>
9 ## This file is part of zcdrip
11 ## Redistribution and use in source and binary forms, with or without
12 ## modification, are permitted provided that the following conditions
15 ## 1. Redistributions of source code must retain the above copyright
16 ## notice, this list of conditions and the following disclaimer.
18 ## 2. Redistributions in binary form must reproduce the above copyright
19 ## notice, this list of conditions and the following disclaimer in the
20 ## documentation and/or other materials provided with the distribution.
22 ## 3. Neither the name of the author nor the names of any contributors
23 ## may be used to endorse or promote products derived from this
24 ## software without specific prior written permission.
26 ## THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
27 ## IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
28 ## WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29 ## DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 ## FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 ## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 ## SUBSTITUTE GOODS OR SERVICES# LOSS OF USE, DATA, OR PROFITS# OR
33 ## BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34 ## WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
35 ## OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
36 ## IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 ## Because I suck at writing makefiles
45 rm -vf zcdrip ecdrip zdiscid
53 rep=$(git describe 2>/dev/null||echo ${tver})
54 zmodload -i zsh/mapfile
55 gcc -Wall -o zdiscid zdiscid.c
56 mapfile[zcdrip]=${mapfile[zcdrip.in]/$sub/$rep}
62 [[ -f zcdrip && -f zdiscid ]] || all
66 target=${target:-/usr/local/bin}
67 INSTALL=${INSTALL:-install}
71 [[ -f zcdrip && -f zdiscid ]] || all
74 $INSTALL -v zcdrip zdiscid $target
75 [[ -f ecdrip ]] && $INSTALL -v ecdrip $target
82 Usage: $ourname [OPTION]
86 all -- builds zdiscid and zcdrip, also runs 'clean'
87 eshell -- create eshell symlink workaround
88 clean -- removes objects
89 install -- installs zcdrip
93 If you want to install zcdrip to a directory somewhere in '${HOME}'
96 target=${HOME}/bin ./build.sh install
105 (install) _install ;;
109 ### build.sh ends here