PATCH: programs/regapi/regSet.sh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The first change has been tested by the FreeBSD port that has been doing
s:/bin/bash:/bin/sh: for ages (without any problems).

The second one adds some parameter checking.

Gerald

ChangeLog:
This is actually a /bin/sh script, /bin/bash is not needed.
Check whether the two input files exists instead of assuming they do.

Index: regSet.sh
===================================================================
RCS file: /home/wine/wine/programs/regapi/regSet.sh,v
retrieving revision 1.5
diff -u -3 -p -r1.5 regSet.sh
--- regSet.sh	1 Jun 2002 02:55:52 -0000	1.5
+++ regSet.sh	2 Oct 2003 08:32:41 -0000
@@ -1,7 +1,7 @@
-#!/bin/bash
+#!/bin/sh

 # This script is the receipe to generate the key that have to be created like
-# if an applicaiton was installed by its installer.  It processes using a
+# if an application was installed by its installer.  It processes using a
 # registry based on the picture of the registry before the application is
 # installed and the picture of the registry after the application is installed.
 #
@@ -30,6 +30,9 @@ if [ $# -ne 2 ]; then
   echo
   exit 1
 fi
+
+if [ ! -f $1 ]; then echo "$1 does not exist."; exit 1; fi
+if [ ! -f $2 ]; then echo "$2 does not exist."; exit 1; fi

 echo "Assuming that $1 is the \"before\" file..."
 echo "Assuming that $2 is the \"after\" file..."


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux