aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkbdata.src/rules/merge.sh
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/xkbdata.src/rules/merge.sh')
-rw-r--r--xorg-server/xkbdata.src/rules/merge.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/xorg-server/xkbdata.src/rules/merge.sh b/xorg-server/xkbdata.src/rules/merge.sh
index 8dfde5546..b18af7c3d 100644
--- a/xorg-server/xkbdata.src/rules/merge.sh
+++ b/xorg-server/xkbdata.src/rules/merge.sh
@@ -1,5 +1,6 @@
-#!/bin/bash
+#!/bin/sh
+INDIR=`dirname $0`
DEST=$1
shift
@@ -11,12 +12,14 @@ basename=`basename $0`
echo "// DO NOT EDIT THIS FILE - IT WAS AUTOGENERATED BY $basename FROM rules/*.part" >$DEST
for i in $*; do
- if [ "$i" == "$HDR" ] || [ "$i" == "HDR" ]; then
+ if [ "$i" = "$HDR" ] || [ "$i" = "HDR" ]; then
echo >> $DEST;
read hdr
echo "$hdr" >> $DEST
+ elif test -f $i; then
+ cat $i >> $DEST || exit 1
else
- cat $i >> $DEST;
+ cat $INDIR/$i >> $DEST || exit 1
fi
done < $HDR