Lines 1-6
Link Here
|
1 |
--- sayaka.sh.orig 2015-06-14 09:43:42 UTC |
1 |
--- sayaka.sh.orig 2015-07-26 15:58:13.000000000 +0900 |
2 |
+++ sayaka.sh |
2 |
+++ sayaka.sh 2015-07-28 14:15:42.646976000 +0900 |
3 |
@@ -27,9 +27,26 @@ |
3 |
@@ -27,11 +27,29 @@ |
4 |
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
4 |
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
5 |
# SUCH DAMAGE. |
5 |
# SUCH DAMAGE. |
6 |
|
6 |
|
Lines 8-13
Link Here
|
8 |
+: ${SAYAKA_HOME:=${HOME}/.sayaka} |
8 |
+: ${SAYAKA_HOME:=${HOME}/.sayaka} |
9 |
#SAYAKA_HOME=. |
9 |
#SAYAKA_HOME=. |
10 |
|
10 |
|
|
|
11 |
+BINDIR=@@BINDIR@@ |
11 |
+DATADIR=@@DATADIR@@ |
12 |
+DATADIR=@@DATADIR@@ |
12 |
+ |
13 |
+ |
13 |
+die() { |
14 |
+die() { |
Lines 15-30
Link Here
|
15 |
+ exit 1 |
16 |
+ exit 1 |
16 |
+} |
17 |
+} |
17 |
+ |
18 |
+ |
18 |
+mklinks() { |
19 |
+checklinks() { |
19 |
+ mkdir $SAYAKA_HOME || die "Can't create ${SAYAKA_HOME}." |
20 |
+ for f in ${BINDIR}/cellsize ${DATADIR}/*.php ${DATADIR}/*.png; do |
20 |
+ cd $SAYAKA_HOME |
21 |
+ [ -L ${f##*/} ] || ln -s $f . |
21 |
+ for f in ${DATADIR}/*.php ${DATADIR}/*.png; do |
|
|
22 |
+ ln -s $f . |
23 |
+ done |
22 |
+ done |
24 |
+} |
23 |
+} |
25 |
+ |
24 |
+ |
26 |
+[ -d $SAYAKA_HOME ] || mklinks |
25 |
+[ -d $SAYAKA_HOME ] || mkdir $SAYAKA_HOME || die "Can't create ${SAYAKA_HOME}." |
27 |
+ |
26 |
+ |
28 |
cd $SAYAKA_HOME |
27 |
cd $SAYAKA_HOME |
29 |
|
28 |
|
|
|
29 |
+checklinks |
30 |
+ |
30 |
cmd=$1 |
31 |
cmd=$1 |
|
|
32 |
[ $# -ne 0 ] && shift |
33 |
case $cmd in |