Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 27 lines (26 sloc) 509 Bytes
#!/bin/bash
CFGDIR=`dirname $0`
CFGDIR=`(cd "$CFGDIR"; pwd -P)`
FILELIST="${CFGDIR}/make_links_files"
DIRLIST="${CFGDIR}/make_links_dirs"
PWD=`pwd`
cd "${CFGDIR}"
echo -n creating directories...
for i in `cat ${DIRLIST}`; do
if [ -d "${CFGDIR}/$i" ]; then
if [ ! -d ~/$i ]; then
mkdir ~/$i
fi
fi
done
echo done
echo -n linking files...
for i in `cat ${FILELIST}`; do
if [ -e "${CFGDIR}/$i" ]; then
if [ -e ~/$i ]; then
rm ~/$i
fi
ln "${CFGDIR}/$i" ~/$i
fi
done
echo done