aboutsummaryrefslogtreecommitdiff
path: root/japanese/elvis
diff options
context:
space:
mode:
authorThomas Gellekum <tg@FreeBSD.org>2000-07-05 12:37:06 +0000
committerThomas Gellekum <tg@FreeBSD.org>2000-07-05 12:37:06 +0000
commit546041ba3113a4a58d8f3e7e7cb90e78fcb38ea8 (patch)
tree7b9cd553a62be7a9bd52800d334be8b703eb93a1 /japanese/elvis
parent01ab6da99c55af36e516b7f8016373124c4039cf (diff)
downloadports-546041ba3113a4a58d8f3e7e7cb90e78fcb38ea8.tar.gz
ports-546041ba3113a4a58d8f3e7e7cb90e78fcb38ea8.zip
Notes
Diffstat (limited to 'japanese/elvis')
-rw-r--r--japanese/elvis/Makefile17
-rw-r--r--japanese/elvis/files/ja-elvis.sh25
2 files changed, 26 insertions, 16 deletions
diff --git a/japanese/elvis/Makefile b/japanese/elvis/Makefile
index cc18cdf7a226..6ebe7ad00db5 100644
--- a/japanese/elvis/Makefile
+++ b/japanese/elvis/Makefile
@@ -34,22 +34,7 @@ post-install:
@${SH} ${PKGDIR}/REQ ${PKGNAME} INSTALL
@if [ ! -f ${STARTUP_SCRIPT} ]; then \
${ECHO} "Installing ${STARTUP_SCRIPT} startup file."; \
- ${ECHO} '#!/bin/sh' > ${STARTUP_SCRIPT}; \
- ${ECHO} 'virecovery=`${ECHO} /var/tmp/elv_*`' \
- >> ${STARTUP_SCRIPT}; \
- ${ECHO} 'if [ "$$virecovery" != '"'/var/tmp/elv_*' ]; then" \
- >> ${STARTUP_SCRIPT}; \
- ${ECHO} " ${ECHO} 'Recovering ja-elvis editor sessions'" \
- >> ${STARTUP_SCRIPT}; \
- ${ECHO} ' for i in $$virecovery; do' \
- >> ${STARTUP_SCRIPT}; \
- ${ECHO} " ${PREFIX}/bin/elvprsv "'$$i' \
- >> ${STARTUP_SCRIPT}; \
- ${ECHO} ' done' \
- >> ${STARTUP_SCRIPT}; \
- ${ECHO} 'fi' >> ${STARTUP_SCRIPT}; \
- ${CHMOD} 755 ${STARTUP_SCRIPT}; \
- ${CHOWN} bin.bin ${STARTUP_SCRIPT}; \
+ ${INSTALL_SCRIPT} ${FILESDIR}/ja-elvis.sh ${STARTUP_SCRIPT};\
fi
.include <bsd.port.mk>
diff --git a/japanese/elvis/files/ja-elvis.sh b/japanese/elvis/files/ja-elvis.sh
new file mode 100644
index 000000000000..10c4b961a0c7
--- /dev/null
+++ b/japanese/elvis/files/ja-elvis.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+fi
+
+case "$1" in
+start)
+ virecovery=`echo /var/tmp/elv_*`
+ if [ "$virecovery" != '/var/tmp/elv_*' ]; then
+ echo 'Recovering ja-elvis editor sessions'
+ for i in $$virecovery; do
+ ${PREFIX}/bin/elvprsv "$i"
+ done
+ fi
+ ;;
+stop)
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ ;;
+esac
+
+exit 0