Do not overwrite User Resource Directory on every snap launch

-f was being used instead of -d for checking the User Resource Directory existence.
Also, remove an indentation inconsistency in the script.
master
Flávio Monteiro 2018-08-18 02:42:19 -03:00 committed by Flavio Monteiro
parent 2f501dbeca
commit 90054b51a7
1 changed files with 2 additions and 2 deletions

View File

@ -10,9 +10,9 @@ case "$SNAP_ARCH" in
;;
esac
if [ ! -f $SNAP_USER_DATA/.local/share/openspades/Resources ];
if [ ! -d $SNAP_USER_DATA/.local/share/openspades/Resources ];
then
mkdir -p $SNAP_USER_DATA/.local/share/openspades/Resources
mkdir -p $SNAP_USER_DATA/.local/share/openspades/Resources
cp $SNAP/share/games/openspades/Resources/* $SNAP_USER_DATA/.local/share/openspades/Resources
echo cl_checkForUpdates: 1 > $SNAP_USER_DATA/.local/share/openspades/Resources/SPConfig.cfg
echo s_eax: 1 >> $SNAP_USER_DATA/.local/share/openspades/Resources/SPConfig.cfg