3 # If you are running on a Kubuntu desktop and you would like to have
4 # the same desktop on the usb key, you can do so by running this
5 # script. You must be root.
9 if [ ! `whoami` = "root" ] ; then
11 echo "You need to be root to run this shell script"
16 echo "This script will overwrite a number of directories on the USB key"
17 echo "for example: .kde .ssh .bashrc .bash_logout .gnupg .mozilla ..."
19 echo "Answer yes to continue "
21 if [ "$a" != "yes" ] ; then
22 echo "Device $USB_DEV unchanged"
26 if [ ! -d ${MOUNT_POINT}/home-rw ] ; then
27 mount ${USB_DEV}3 ${MOUNT_POINT}/home-rw
29 if [ ! -d ${MOUNT_POINT}/home-rw ] ; then
30 echo "Mount of home-rw USB partition failed."
31 echo "Please pre-mount the USB stick and run this script again."
34 cd ${MOUNT_POINT}/home-rw
35 if [ $? -ne 0 ] ; then
36 echo "Could not cd to home-rw USB partition"
41 chown 1000:1000 ubuntu
44 for i in .bashrc .bash_logout ; do
45 if [ -f ${MY_HOME}/$i ] ; then
51 # Special case for .kde
53 echo "Copying .kde ..."
57 cp -a $MY_HOME/.kde/share .
59 chown -R 1000:1000 .kde
62 for i in .gnupg .ssh .mozilla Desktop ; do
63 if [ -d ${MY_HOME}/$i ] ; then