3 # QuickInst - script for quick installation of lilo
5 # Copyright 2010 Joachim Wiedorn
8 # Licensed under the terms contained in the file 'COPYING'
9 # in the source directory.
14 if [ ! -f "./src/lilo.c" ]; then
15 echo "You are not in the main source directory of LILO - Abort!"
21 if [ "$UID" != "0" ]; then
22 echo "For installing LILO you must be ROOT - Abort!"
29 # absolute path to directory ?
30 if [ `echo "$1" | sed 's#^\/##g'` = "$1" ]; then
32 BDIR=`echo "${ADIR}/${1}" | sed 's#\/\/#\/#g'`
34 BDIR=`echo "/${1}" | sed 's#\/\/#\/#g'`
37 # existing directory ?
38 if [ -e "${BDIR}" ]; then
41 # try to create directory
42 mkdir -p ${BDIR} 2>/dev/null || true
43 if [ -e "$BDIR" ]; then
46 echo "Cannot create directory ${1} - Abort!"
51 # writeable directory ?
52 if [ ! -w "$DDIR" ]; then
53 echo "Cannot write to directory $DDIR - Abort!"
59 echo "~~~~~~~~~~~~ make all ~~~~~~~~~~~~"
62 echo "~~~~~~~~~~ make install ~~~~~~~~~~"
63 if [ -n "$DDIR" ]; then
64 make install DESTDIR="$DDIR"
71 echo "LILO installed${DDTEXT}."