added .bashrc + fixed compaq hostname
[scripts/scripts.git] / backup.sh
index 5cd15a2..1a1ebc8 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
 
@@ -147,13 +148,13 @@ if [ "$host" = "right-hand" ] ; then
        for i in www cvs hdw; do
                if [ -d /chroot/$i ] ; then
                        echo "copying /chroot/$i"
-                       tar .cf ./chroot/$i.tar /chroot/$i
+                       tar -cf ./chroot/$i.tar /chroot/$i
                fi
        done
 fi
 
 # hackstation / mobile / hdw / sparc specific data
-if [ "$host" = "hackstation" -o "$host" = "mobile" -o "$host" = "hdw" -o "$host" = "sparc" -o "$host" = "left-hand" ] ; then
+if [ "$host" = "hackstation" -o "$host" = "mobile" -o "$host" = "hdw" -o "$host" = "sparc" -o "$host" = "compaq" ] ; then
 
        # home of hackbard
        mkdir -p ./home/hackbard
@@ -167,7 +168,7 @@ if [ "$host" = "hackstation" -o "$host" = "mobile" -o "$host" = "hdw" -o "$host"
                        cp -r /home/hackbard/projects ./home/hackbard
        fi
        for i in xinitrc_evil xinitrc_wm .xinitrc GNUstep .Xauthority \
-                       .Xdefaults .signature .directfbrc; do
+                       .Xdefaults .signature .directfbrc .bashrc; do
                [ -f /home/hackbard/$i ] && \
                        cp -r /home/hackbard/$i ./home/hackbard
        done