be clever - create the mountpoint first :-o
[scripts/scripts.git] / backup.sh
index 857dcae..cbed041 100755 (executable)
--- a/backup.sh
+++ b/backup.sh
@@ -5,6 +5,7 @@
 backup_date=`date | awk '{ print $3"."$2"."$6 }'`
 host=`hostname`
 
+[ ! -d /mnt/nfs ] && mkdir -p /mnt/nfs
 
 # set the backup directory
 if [ "$host" = "gate" ] ; then
@@ -77,9 +78,9 @@ echo "config stuff:"
 mkdir ./${host}-conf && cd ./${host}-conf 
 
 for i in $kernel_num; do
-       if [ -f /usr/src/linux-${i}*/.config ] ; then
+       if [ -f /usr/src/linux-${i}/.config ] ; then
                echo "copying /usr/src/linux/.config"
-               cp /usr/src/linux-${i}*/.config ./$host-kernel-${i}-config
+               cp /usr/src/linux-${i}/.config ./$host-kernel-${i}-config
        fi
 done