Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 21 lines (16 sloc) 444 Bytes
#!/bin/bash
function link_file {
new_file=$1
curr_file=$2
# Check if an old config file is there or a link to one is there
if [ -e $curr_file ] || [ -h $curr_file ]; then
BACKUP=$curr_file.world-machine.bak
echo -n "Backing up old $curr_file to $BACKUP..."
mv $curr_file $BACKUP
echo 'Done'
fi
echo -n "Linking new $curr_file..."
ln -s $new_file $curr_file
echo 'Done'
}
WORLD_MACHINE=$HOME/.world-machine