Browse Source

Initial revision

ceriel 37 years ago
parent
commit
5dacfb665d
2 changed files with 43 additions and 0 deletions
  1. 10 0
      modules/compare
  2. 33 0
      modules/install

+ 10 - 0
modules/compare

@@ -0,0 +1,10 @@
+case $# in
+1)	DEST="$1"
+	SRC=`basename $DEST`
+	;;
+2)	DEST="$2"
+	SRC="$1"
+	;;
+*)	echo $0 [source] destination ;;
+esac
+cmp "$SRC" ../../$DEST

+ 33 - 0
modules/install

@@ -0,0 +1,33 @@
+case $# in
+1)	DEST="$1"
+	SRC=`basename $DEST`
+	;;
+2)	DEST="$2"
+	SRC="$1"
+	;;
+*)	echo 'Usage:' $0 [source] destination 1>&2
+	exit 1
+	;;
+esac
+DIR=`expr "$DEST" ':' '\(.*\)/[^/]*' '|' "XXXX"`
+case $DIR in
+XXXX)	echo 'Illegal desination argument:' "$DEST"
+	exit 1
+	;;
+esac
+mkdir ../../$DIR > /dev/null 2>&1
+chmod 775 ../../$DIR > /dev/null 2>&1
+if cp "$SRC" ../../$DEST >/dev/null 2>&1 ||
+	 { rm -f ../../$DEST >/dev/null 2>&1 &&
+           cp "$SRC" ../../$DEST >/dev/null 2>&1
+	 }
+then
+	if (ar t ../../$DEST | grep __.SYMDEF ) >/dev/null 2>&1
+	then
+		ranlib ../../$DEST
+	fi
+	exit 0
+else
+	echo Sorry, can not create "$DEST".
+	exit 1
+fi