Author: nextgens
Date: 2008-06-22 03:16:27 +0000 (Sun, 22 Jun 2008)
New Revision: 20611
Modified:
trunk/apps/new_installer/scripts/update.sh
Log:
update.sh: get rid of 'cmp' support
Modified: trunk/apps/new_installer/scripts/update.sh
===================================================================
--- trunk/apps/new_installer/scripts/update.sh 2008-06-22 03:00:08 UTC (rev
20610)
+++ trunk/apps/new_installer/scripts/update.sh 2008-06-22 03:16:27 UTC (rev
20611)
@@ -27,17 +27,7 @@
return 1
}
-# Three functions used to compare files: return 0 if it matches
-file_cmp_comp () {
- if file_exist "$1" "$2"
- then
- cmp -s "$1" "$2"
- return $?
- else
- return 1
- fi
-}
-
+# Two functions used to compare files: return 0 if it matches
file_md5sum_comp () {
if file_exist "$1" "$2"
then
@@ -66,13 +56,8 @@
then
if test ! -x "`which md5sum`"
then
- if test ! -x "`which cmp`"
- then
- echo "No cmp nor md5sum nor sha1sum utility detected;
Please install one of those"
- exit 1
- else
- CMP="invert_return_code file_cmp_comp"
- fi
+ echo "No md5sum nor sha1sum utility detected; Please install
one of those"
+ exit 1
else
CMP="invert_return_code file_md5sum_comp"
fi
@@ -195,7 +180,7 @@
chmod +x update.sh
touch update.sh update2.sh
- if cmp update.sh update2.sh >/dev/null 2>&1
+ if $CMP update.sh update2.sh >/dev/null
then
echo "Your update.sh is up to date"
else