#!/bin/sh
pwd=$(pwd)
export PS1='\w\$ '
umask 022
export LD_LIBRARY_PATH=$pwd/lib:/lib:/usr/lib
version="07"
export HOME="/mnt/utmp/fasttracker2clone" XDG_CONFIG_HOME="/mnt/utmp/fasttracker2clone"
#export HOME=$pwd
if [ -d /mnt/utmp/fasttracker2clone/share ];then
export XDG_DATA_DIRS=/mnt/utmp/fasttracker2clone/share
XDG_DATA_DIRS:/usr/share
fi
if [ ! -e home ]
then
mkdir home
fi
export HOME=$pwd/home
if [ -e home/.version ];then
lastrun=`cat home/.version`
else
lastrun="00"
echo "no version found..then copy new songs dir"
cp -r backup/songs/* $HOME/songs
fi
#check config file
if [ ! -d $HOME/.config ]; then
echo "copy config dir"
mkdir $HOME/.config
cp -r backup/.config/* $HOME/.config
fi
#check songs dir
if [ ! -d $HOME/songs ]; then
echo "copy songs dir"
mkdir $HOME/songs
cp -r backup/songs/* $HOME/songs
fi
#all done, write the new lastrun...
if [ ! "$version" = "$lastrun" ];then
echo "$version">home/.version
fi
export LIBGL_FB=1
export LIBGL_FASTMATH=1
export LIBGL_VSYNC=1
./ft2-clone