3 # copyright info at bottom
8 GILT_HOOKUP_DEBUG
="${GILT_HOOKUP_DEBUG:-}"
10 if (( GILT_HOOKUP_DEBUG
)); then
16 # create a temp directory to hold just the staged content
17 # mktemp is used twice here, the first works on gnu,
18 # the second works on mac
19 stage_dir
=`mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir'`
21 # remove the temp staging directory when sigterm, sigint (ctrl-c),
22 # and when the script exits normally
23 # the exit status of the script will not be affected by this trap
24 # when it traps the SIGEXIT signal
25 # if we're debugging, then leave the testing directory around
27 if (( ! GILT_HOOKUP_DEBUG
)); then
28 trap 'rm -rf "$stage_dir"' SIGTERM SIGINT EXIT
31 # checkout all staged files into temporary staging directory
32 git checkout-index
--prefix="${stage_dir}/" --all \
35 if (( GILT_HOOKUP_DEBUG
)); then
39 # run make in temporary staging directory
40 make --directory="$stage_dir"
42 # flibbertigibbet is a lein new flibbertigibbet project-name
43 # Copyright (C) 2016 daniel watson
45 # This file is part of flibbertigibbet.
47 # flibbertigibbet is free software: you can redistribute it and/or
48 # modify it under the terms of the GNU Affero General Public License as
49 # published by the Free Software Foundation, either version 3 of the
50 # License, or (at your option) any later version.
52 # flibbertigibbet is distributed in the hope that it
53 # will be useful, but WITHOUT ANY WARRANTY; without even the implied
54 # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
55 # the GNU General Affero Public License for more details.
57 # You should have received a copy of the GNU Affero General Public License
58 # along with flibbertigibbet. If not, see
59 # <http://www.gnu.org/licenses/>.