Author Topic: Zhomefix  (Read 2597 times)

xotica

  • Newbie
  • *
  • Posts: 14
    • View Profile
Zhomefix
« on: February 07, 2006, 12:08:04 am »
Hi, I was wondering if someone please upload a copy of zhome fix.  I cant seem to find it anywhere.  

thanks, Allen

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
Zhomefix
« Reply #1 on: February 07, 2006, 12:35:20 am »
I had this laying around hope Meanie doesnt mind...

#!/bin/sh
#
# zhomefix -  program to move user data to alternate place
# version 0.1
#
# Copyright © 2005 hdluc@yahoo.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
######################################################################
ZHOME=/hdd2/zaurushome
#ZHOME=/hdd3/zaurushome

echo ""
echo "Zaurus SL-C3000 - zhome fixer"
echo ""
if [ ! -d $ZHOME ]; then
  echo "creating $ZHOME ..."
  mkdir $ZHOME
fi
for i in `ls -ad /home/zaurus/.*`
do
  if [ "$i" != "/home/zaurus/." ] && [ "$i" != "/home/zaurus/.." ] && [ "$i" != "/home/zaurus/.profile" ]; then
    FT=`file $i 2>/dev/null|grep symbolic`
    if [ "$FT" = ""  ]; then
      if [ -d $i ]; then
        echo linking directory $i
        mv $i $ZHOME
        ln -s $ZHOME/`basename $i` $i
      fi
      if [ -f $i ]; then
        echo linking file $i
        mv $i $ZHOME
        ln -s $ZHOME/`basename $i` $i
      fi
    else
      echo $i is already linked
    fi
  fi
done
echo ""
echo "Done."
echo "hidden config files and directories"
echo "have been moved and linked to $ZHOME"
echo ""
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

xotica

  • Newbie
  • *
  • Posts: 14
    • View Profile
Zhomefix
« Reply #2 on: February 07, 2006, 05:32:00 pm »
THANKS!