summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Straube2016-12-04 22:14:19 +0100
committerMichael Straube2016-12-04 22:14:19 +0100
commitb16ce35700144ba5b797bb7da371a32aa62f2bc9 (patch)
tree56f1008bec45043a93d511636990d7a397f6bf3e
parentef68fd9eefe997a762808a0c84cfaa8aeac5897d (diff)
downloadaur-b16ce35700144ba5b797bb7da371a32aa62f2bc9.tar.gz
Improve start script to support saving
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--prince18
3 files changed, 20 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 26d81ef5329..c388216be96 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = sdlpop
pkgdesc = An open-source port of Prince of Persia
pkgver = 1.16
- pkgrel = 4
+ pkgrel = 5
url = https://github.com/NagyD/SDLPoP
arch = i686
arch = x86_64
@@ -11,7 +11,7 @@ pkgbase = sdlpop
source = https://github.com/NagyD/SDLPoP/archive/v1.16.tar.gz
source = prince
sha1sums = 9e6f124705ef3c6e9c66c34046c9d4d5deaffa57
- sha1sums = 303a77bb74743eecd7b5e86cda2e6a1e29167193
+ sha1sums = 79acf33eab835f1eba0f3c4d76055d68155a6254
pkgname = sdlpop
diff --git a/PKGBUILD b/PKGBUILD
index b67c2419bcb..0dfd35295eb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=sdlpop
pkgver=1.16
-pkgrel=4
+pkgrel=5
pkgdesc="An open-source port of Prince of Persia"
arch=('i686' 'x86_64')
license=('GPL3')
@@ -11,7 +11,7 @@ depends=('sdl2_image' 'sdl2_mixer')
source=("https://github.com/NagyD/SDLPoP/archive/v$pkgver.tar.gz"
"prince")
sha1sums=('9e6f124705ef3c6e9c66c34046c9d4d5deaffa57'
- '303a77bb74743eecd7b5e86cda2e6a1e29167193')
+ '79acf33eab835f1eba0f3c4d76055d68155a6254')
build() {
cd SDLPoP-$pkgver
diff --git a/prince b/prince
index 2762b5d15af..c6e2d86daa6 100644
--- a/prince
+++ b/prince
@@ -1,3 +1,17 @@
#!/bin/bash
-cd /usr/share/sdlpop
-/usr/lib/sdlpop/prince "$@"
+
+GAMEDIR="/usr/share/sdlpop"
+HOME_GAMEDIR="${HOME}/.SDLPoP"
+
+if [[ -d ${HOME_GAMEDIR} ]]; then
+ cd ${HOME_GAMEDIR}
+ /usr/lib/sdlpop/prince "$@"
+else
+ mkdir ${HOME_GAMEDIR}
+ cd ${HOME_GAMEDIR}
+ ln -s ${GAMEDIR}/data
+ ln -s ${GAMEDIR}/doc
+ ln -s ${GAMEDIR}/*.DAT .
+ ln -s ${GAMEDIR}/SDLPoP.ini
+ /usr/lib/sdlpop/prince "$@"
+fi