Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 34 lines (24 sloc) 754 Bytes
# find most recent profile
profile=$(find ./current/ -name *#* -printf '%T@ %p\n' | sort -k 1nr | sed 's/^[^ ]* //' | head -n 1)
# make usable copy of profile
./copyProfiles.sh
# copy to master file
cp $profile ./current/MM.xml
# remove HostPackage information
sed -i '/<Host/,/<\/HostPackage>/d' ./current/MM.xml
# remove password from auto connect
sed -i 's/7\.5,\[\[send(\&quot;.*\&quot/7\.5,\[\[send(\&quot;\&quot/' ./current/MM.xml
# find most recent map
profile=$(find ./map/ -name *dat -printf '%T@ %p\n' | sort -k 1nr | sed 's/^[^ ]* //' | head -n 1)
# backup map
cp $profile ./map/mm
# remove old map files
cd map
rm `ls -t | awk 'NR>6'`
cd ..
# remove old config files
cd current
rm `ls -t | awk 'NR>12'`
cd ..
#update git
git add map