1.1 --- a/tools/install.sh Tue May 29 19:02:55 2018 +0200
1.2 +++ b/tools/install.sh Tue May 29 22:26:18 2018 +0200
1.3 @@ -1,12 +1,7 @@
1.4 #!/bin/sh
1.5
1.6 -if ! which realpath > /dev/null ; then
1.7 - echo "Please install the realpath program." 1>&2
1.8 - exit 1
1.9 -fi
1.10 -
1.11 THISDIR=`dirname "$0"`
1.12 -DIRNAME=`realpath "$THISDIR/.."`
1.13 +DIRNAME=`readlink -f "$THISDIR/.."`
1.14 PROGNAME=`basename "$0"`
1.15
1.16 if [ "$1" = '--help' ]; then
1.17 @@ -53,6 +48,10 @@
1.18 CLEAN=
1.19 fi
1.20
1.21 +# Check the configuration, if possible.
1.22 +
1.23 +"$THISDIR/checkconfig.sh" "$L4DIR"
1.24 +
1.25 # Generate binaries if appropriate.
1.26
1.27 if [ ! "$CLEAN" ] ; then
1.28 @@ -68,7 +67,7 @@
1.29 # Copy (or remove) each of the objects.
1.30
1.31 for OBJTYPE in 'conf' 'pkg' ; do
1.32 - TARGETDIR=`realpath "$L4DIR"`/$OBJTYPE
1.33 + TARGETDIR=`readlink -f "$L4DIR"`/$OBJTYPE
1.34 SOURCEDIR="$DIRNAME/$OBJTYPE"
1.35
1.36 # If cleaning, remove all objects.
1.37 @@ -76,7 +75,7 @@
1.38 if [ "$CLEAN" ] ; then
1.39 for OBJECT in "$SOURCEDIR/"* ; do
1.40 OBJNAME=`basename "$OBJECT"`
1.41 - ORIGIN=`realpath "$OBJECT"`
1.42 + ORIGIN=`readlink -f "$OBJECT"`
1.43 TARGET="$TARGETDIR/$OBJNAME"
1.44
1.45 if [ -d "$TARGET" ] ; then
1.46 @@ -92,7 +91,7 @@
1.47 # Make directories.
1.48
1.49 for OBJECT in `find "$SOURCEDIR" -type d -print` ; do
1.50 - ORIGIN=`realpath "$OBJECT"`
1.51 + ORIGIN=`readlink -f "$OBJECT"`
1.52 RELPATH=${ORIGIN#$SOURCEDIR/}
1.53
1.54 # Skip top-level directories.
1.55 @@ -111,7 +110,7 @@
1.56 # Copy new files.
1.57
1.58 for OBJECT in `find "$SOURCEDIR" -type f -not -name '.*' -not -name '*.orig' -not -name '*.rej' -print` ; do
1.59 - ORIGIN=`realpath "$OBJECT"`
1.60 + ORIGIN=`readlink -f "$OBJECT"`
1.61 RELPATH=${ORIGIN#$SOURCEDIR/}
1.62 TARGET="$TARGETDIR/$RELPATH"
1.63
1.64 @@ -124,7 +123,7 @@
1.65
1.66 for OBJECT in "$SOURCEDIR/"* ; do
1.67 OBJNAME=`basename "$OBJECT"`
1.68 - ORIGIN=`realpath "$OBJECT"`
1.69 + ORIGIN=`readlink -f "$OBJECT"`
1.70
1.71 # Examine the target object directory for files that are not provided
1.72 # by the distribution.
1.73 @@ -132,7 +131,7 @@
1.74 TARGET="$TARGETDIR/$OBJNAME"
1.75
1.76 for FILENAME in `find "$TARGET" -type f -not -name '.*' -not -name '*.orig' -not -name '*.rej' -print` ; do
1.77 - PATHNAME=`realpath "$FILENAME"`
1.78 + PATHNAME=`readlink -f "$FILENAME"`
1.79 RELPATH=${PATHNAME#$TARGET}
1.80 SOURCE="$ORIGIN/$RELPATH"
1.81
1.82 @@ -144,7 +143,7 @@
1.83 # Remove obsolete directories.
1.84
1.85 for FILENAME in `find "$TARGET" -depth -type d -print` ; do
1.86 - PATHNAME=`realpath "$FILENAME"`
1.87 + PATHNAME=`readlink -f "$FILENAME"`
1.88 RELPATH=${PATHNAME#$TARGET}
1.89 SOURCE="$ORIGIN/$RELPATH"
1.90