forked from OCamlPro/gnucobol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·42 lines (38 loc) · 1.33 KB
/
autogen.sh
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
#!/bin/sh
# autogen.sh gnucobol
# Bootstrap gnucobol package from checked-out sources
# Note: call as ./autogen.sh if you don't have readlink -f
#
# Copyright (C) 2019, 2022 Free Software Foundation, Inc.
# Written by Simon Sobisch
#
# This file is part of GnuCOBOL.
#
# The GnuCOBOL compiler is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# GnuCOBOL is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GnuCOBOL. If not, see <https://www.gnu.org/licenses/>.
me=autogen.sh
# get path to GnuCOBOL main directory
if test "$0" = "./$me"; then
MAINPATH=.
GCMAINPATH=".."
else
MAINPATH="$(dirname "$(readlink -f "$0")")"
GCMAINPATH="$MAINPATH"
fi
if test ! -f "$MAINPATH/$me"; then
echo; echo "ERROR - cannot set main directory [checked '$MAINPATH/$me'] - aborting $me" && exit 1
fi
(chmod -f u+x "$MAINPATH/build_aux/bootstrap"; "$MAINPATH/build_aux/bootstrap"); ret=$?
if test $ret -ne 0; then
exit $ret
fi