Browse Source

work around rsync overwriting destination symlink issue

master
poikilos 6 years ago
committed by Jacob Gustafson
parent
commit
cf15209846
  1. 20
      webapp/install-mts.sh

20
webapp/install-mts.sh

@ -55,12 +55,22 @@ if [ ! -d minetest ]; then
echo "ERROR: can't install since missing `pwd`/minetest" echo "ERROR: can't install since missing `pwd`/minetest"
exit 1 exit 1
fi fi
echo "Installing minetest to '$HOME'..." try_dest="/tank/local/owner/minetest"
rsync -rt minetest/ $HOME/minetest if [ -d "$try_dest" ]; then
if [ ! -f "$dest_flag_file" ]; then echo "Installing minetest as symlink '$HOME/minetest' pointing to '$try_dest'..."
echo "ERROR: not complete--couldn't create '$dest_flag_file'" rsync -rt minetest/ $try_dest
exit 1 if [ ! -d "$HOME/minetest" ]; then
ln -s $try_dest $HOME/minetest
fi
else
echo "Installing minetest to '$HOME'..."
rsync -rt minetest/ $HOME/minetest
if [ ! -f "$dest_flag_file" ]; then
echo "ERROR: not complete--couldn't create '$dest_flag_file'"
exit 1
fi
fi fi
flag_dir="$HOME/minetest/games/Bucket_Game" flag_dir="$HOME/minetest/games/Bucket_Game"
if [ ! -d "$flag_dir" ]; then if [ ! -d "$flag_dir" ]; then
echo "ERROR: missing $flag_dir" echo "ERROR: missing $flag_dir"

Loading…
Cancel
Save