From caeb6b311df027510b3eb2a822aaa8597b15e33a Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 5 Jan 1987 10:58:34 +0000 Subject: [PATCH] Initial revision --- modules/compare | 10 ++++++++++ modules/install | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100755 modules/compare create mode 100755 modules/install diff --git a/modules/compare b/modules/compare new file mode 100755 index 000000000..5eca5d660 --- /dev/null +++ b/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 diff --git a/modules/install b/modules/install new file mode 100755 index 000000000..7aa57e7b8 --- /dev/null +++ b/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