summaryrefslogtreecommitdiff
path: root/misc/heyu
diff options
context:
space:
mode:
authorsalo <salo@pkgsrc.org>2004-07-10 23:45:59 +0000
committersalo <salo@pkgsrc.org>2004-07-10 23:45:59 +0000
commit33e96aa1988aa2cdc0694ee5792895451c117542 (patch)
treef54f12fec9385a973bf0acf7c9566cb46c09264f /misc/heyu
parentcacf066cd585b88c195f49c6a65cc166d04e9788 (diff)
downloadpkgsrc-33e96aa1988aa2cdc0694ee5792895451c117542.tar.gz
Replace test -e with -f and -h respectively.
Addresses part of PR pkg/26235 by Georg Schwarz.
Diffstat (limited to 'misc/heyu')
-rw-r--r--misc/heyu/distinfo4
-rw-r--r--misc/heyu/patches/patch-ag49
2 files changed, 28 insertions, 25 deletions
diff --git a/misc/heyu/distinfo b/misc/heyu/distinfo
index d2b8181674e..e595c39b867 100644
--- a/misc/heyu/distinfo
+++ b/misc/heyu/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2004/02/02 21:07:26 abs Exp $
+$NetBSD: distinfo,v 1.7 2004/07/10 23:45:59 salo Exp $
SHA1 (heyu-1.35/x10_heyu.tgz) = c392bab9e7b2c7f911a8861c598af18d50519f1c
Size (heyu-1.35/x10_heyu.tgz) = 84277 bytes
@@ -8,4 +8,4 @@ SHA1 (patch-ac) = 345bf95e4ee0df554bbc635e0f8913ca0f66b987
SHA1 (patch-ad) = 5f52f30820f5ed8da10fbc650980137a738c1c78
SHA1 (patch-ae) = a40e699a3f02a71cecc7539e34393b5d617bb20d
SHA1 (patch-af) = 3cf25e4abac4e0dd52398381a1c304e2d0ebfc94
-SHA1 (patch-ag) = 1dc79a441ec88b1d3b4d0f4ae8652fdbeca03925
+SHA1 (patch-ag) = f5f4783dc4914befd42ba827630568b88ad9b472
diff --git a/misc/heyu/patches/patch-ag b/misc/heyu/patches/patch-ag
index d17bb065388..06498487881 100644
--- a/misc/heyu/patches/patch-ag
+++ b/misc/heyu/patches/patch-ag
@@ -1,8 +1,17 @@
-$NetBSD: patch-ag,v 1.4 2004/02/02 21:07:26 abs Exp $
+$NetBSD: patch-ag,v 1.5 2004/07/10 23:45:59 salo Exp $
---- install.sh.orig Tue Sep 4 05:11:45 2001
-+++ install.sh
-@@ -28,7 +28,7 @@ if [ "$FOUND" = "" ] ; then
+--- install.sh.orig 2003-12-16 17:54:55.000000000 +0100
++++ install.sh 2004-07-11 01:44:38.000000000 +0200
+@@ -17,7 +17,7 @@
+ # Files: x10config x10sched.conf
+ FOUND=
+ for FL in $X10CONFIG $HOME/.x10config /etc/x10.conf ; do
+-if [ -e $FL ] ; then
++if [ -f $FL -o -h $FL ] ; then
+ FOUND=$FL
+ echo "An X10 Configuration file was found at $FL"
+ break
+@@ -28,7 +28,7 @@
while : ; do
echo "Where would you like the sample X10 configuration installed?"
echo "The default is $HOME/.x10config"
@@ -11,25 +20,23 @@ $NetBSD: patch-ag,v 1.4 2004/02/02 21:07:26 abs Exp $
if [ "$WHERE" = "" ] ; then
FOUND=$HOME/.x10config
break
-@@ -56,14 +56,9 @@ if [ ! -f $FOUND ] ; then
+@@ -56,14 +56,9 @@
;;
esac
echo "To which port is the CM11 attached?"
- read WHERE
- if [ "$WHERE" != "" ] ; then
- if [ -e $WHERE ] ; then
-- TTY=$WHERE
-- break
++ WHERE=$DEFAULT_SERIAL_DEVICE
+ TTY=$WHERE
+ break
- fi
- echo "I could not find the device you specified. Please try again."
- fi
-+ WHERE=$DEFAULT_SERIAL_DEVICE
-+ TTY=$WHERE
-+ break
done
sed "s;^TTY.*;TTY $TTY;" x10config > $FOUND
-@@ -71,29 +66,22 @@ fi
+@@ -71,29 +66,22 @@
echo "X10 configuration file at $FOUND will be used."
@@ -44,28 +51,24 @@ $NetBSD: patch-ag,v 1.4 2004/02/02 21:07:26 abs Exp $
- echo "fatal error: The TTY device $TTY can not be located"
- exit
-fi
-+if [ -e $TTY ]; then
++if [ -c $TTY -o -h $TTY ]; then
+ eval `sed -n "s/^TTY[ ]*/TTY=/p" $FOUND`
-if [ "$1" != crwxrwxrwx ] ; then
- if [ "$ME" != root ] ; then
-- echo "If you want users other than root to be able to run HEYU, "
-- echo "you'll have to log in as root and run the command \"chmod 777 $TTY\""
-- else
-- chmod 777 $TTY
-- fi
--else
-- echo "The TTY permissions were OK."
+ #Check TTY permisions
+ set `ls -l $TTY` none
+ if [ $1 = "none" ] ; then
+ echo "WARNING: The TTY device $TTY can not be located"
+ else
+ if [ "$1" != crwxrwxrwx ] ; then
-+ echo "If you want users other than root to be able to run HEYU, "
-+ echo "you'll have to log in as root and run the command \"chmod 777 $TTY\""
-+ else
-+ echo "The TTY permissions were OK."
+ echo "If you want users other than root to be able to run HEYU, "
+ echo "you'll have to log in as root and run the command \"chmod 777 $TTY\""
+ else
+- chmod 777 $TTY
+- fi
+-else
+ echo "The TTY permissions were OK."
+ fi
+ fi
fi