]> git.sur5r.net Git - bacula/rescue/blob - rescue/knoppix/cdrom/makeenv
Add new knoppix directory
[bacula/rescue] / rescue / knoppix / cdrom / makeenv
1 #!/bin/sh
2
3 . ./config
4
5 if [ ! -f $KNOPPIX_SOURCE ]; then
6   echo "Please edit config file and set appropriate values (KNOPPIX_SOURCE)"
7   exit 1;
8 fi
9
10 [ ! -d $REMASTER_PATH/master/KNOPPIX ] && mkdir -p $REMASTER_PATH/master/KNOPPIX
11 [ ! -d $REMASTER_PATH/master/boot ] && cp isolinux.tar.bz2 $REMASTER_PATH/master/ && cd $REMASTER_PATH/master && tar -xjf isolinux.tar.bz2 && rm isolinux.tar.bz2
12
13 # preparing the knoppix source folder
14 if [ ! -d $REMASTER_PATH/source ]; then
15   if [ -f $KNOPPIX_SOURCE ]; then
16     cd $REMASTER_PATH 
17     echo "Detarring knoppix source file, this can take some minutes"
18     tar -xjf $KNOPPIX_SOURCE
19   elif [ ${KNOPPIX_SOURCE:0:4} == "http"]; then
20     cd $REMASTER_PATH
21     if [ -f `which wget`]; then
22       wget $KNOPPIX_SOURCE
23     elif [ -f `which curl`]; then
24       curl $KNOPPIX_SOURCE > knoppix.source.tar.bz2
25     else
26       "could not download $KNOPPIX_SOURCE, please do it by hand and edit config"
27     fi
28   else
29     echo "problem with accessing knoppix source file"
30   fi
31 fi