1 ## arg 1: the new package version
3 echo "Make sure to add your user to the games group to play dwarffortress"
7 ## arg 1: the new package version
8 ## arg 2: the old package version
10 #may need to update savegames
11 if [ ! `vercmp $2 $1` -eq 1 ]; then
12 echo "Raws might have changed. Do you want to update your savegames? [y/N]"
14 if [[ ("${choice}" == "y") || ("${choice}" == "Y") ]]; then
15 for dir in $(find /opt/df_linux-ih/data/save/ -type d); do
16 if [ -d "${dir}/raw" ]; then
17 echo "Upgrading save ${dir}"
18 cp -rf /opt/df_linux-ih/raw "${dir}/"
24 # Make sure that permissions are correct
25 chown -R root:games /opt/df_linux-ih/data
26 find /opt/df_linux-ih/data/save -type d -exec chmod 775 {} + &
27 find /opt/df_linux-ih/data/save -type f -exec chmod 664 {} + &
31 # vim:set ts=2 sw=2 et: