diff --git a/lib/functions.in b/lib/functions.in index f673d19..2b98936 100644 --- a/lib/functions.in +++ b/lib/functions.in @@ -272,7 +272,7 @@ function eval_config_command() { config_command="$configprefix $configscript" sub_scripts="$( find $( dirname $configscript ) -name configure )" - if [ "$cleanconfopt" == "0" ]; then + if [ "$cleanconfopt" = "0" ]; then config_command="$config_command $@" else # remove unsupported config script options @@ -536,7 +536,7 @@ pkginstalled() { if [ $# -eq 0 ]; then return 1 # nothing - elif [ "$1" == "-f" ]; then + elif [ "$1" = "-f" ]; then effective=1; shift elif atstage rebuild; then effective=1 @@ -809,7 +809,7 @@ autoextract_zip() { # Main program for building a package # build_this_package() { - if [ ".$desc_SRC" == "." ] ; then + if [ ".$desc_SRC" = "." ] ; then # Autodetect source tar and extract it # if [ "$srctar" = auto ] ; then @@ -911,7 +911,7 @@ build_this_package() { if [ -z "$custmain" ]; then while [ ${buildloop:-1} -le ${buildloops:-1} ]; do - [ "${buildloops:-1}" == "1" ] || echo "loop ${buildloop:-1} of ${buildloops:-1} for $xsrctar." + [ "${buildloops:-1}" = "1" ] || echo "loop ${buildloop:-1} of ${buildloops:-1} for $xsrctar." hook_eval preconf @@ -1048,7 +1048,7 @@ source_file() { local pre= file="$2" url="$3" mirror="mirror" # '-' as $url prefix means, nomirrorable - [ "${url:0:1}" == "-" ] && mirror="local" + [ "${url:0:1}" = "-" ] && mirror="local" # inside Build-Pkg $archdir is set if [ -n "$archdir" ]; then @@ -1068,7 +1068,7 @@ match_source_file() { local x= file= url= mirror= local found=1 - if [ "$1" == "-p" ]; then + if [ "$1" = "-p" ]; then showpath=1; shift fi pattern="$1"; shift @@ -1081,7 +1081,7 @@ match_source_file() { if [ $showpath -eq 0 ]; then echo $file else - [ "${url:0:1}" == "-" ] && mirror="local" || mirror="mirror" + [ "${url:0:1}" = "-" ] && mirror="local" || mirror="mirror" echo $base/download/${mirror}/${file:0:1}/$file fi done < <( grep -e "^\[D\].*$pattern" $base/package/*/$package/$package.desc ) diff --git a/lib/init/formats/tail.in b/lib/init/formats/tail.in index 6f52a46..e73c6cc 100644 --- a/lib/init/formats/tail.in +++ b/lib/init/formats/tail.in @@ -22,7 +22,7 @@ tail_read() { local verbose=1 file= output= query= local query= count=2 - if [ "$1" == "-q" ]; then + if [ "$1" = "-q" ]; then verbose= shift fi diff --git a/lib/misc/PackBuildInfo.sh b/lib/misc/PackBuildInfo.sh index f116779..3371634 100755 --- a/lib/misc/PackBuildInfo.sh +++ b/lib/misc/PackBuildInfo.sh @@ -15,7 +15,7 @@ # --- SDE-COPYRIGHT-NOTE-END --- config=default -if [ "$1" == "-cfg" ]; then +if [ "$1" = "-cfg" ]; then config=$2; shift; shift fi diff --git a/lib/misc/RegressionsReport.sh b/lib/misc/RegressionsReport.sh index ce5f102..77d6640 100755 --- a/lib/misc/RegressionsReport.sh +++ b/lib/misc/RegressionsReport.sh @@ -17,7 +17,7 @@ config=default TARGET=regressions revision=`svn info | sed -n 's,^Revision: \(.*\),\1,p'` -if [ "$1" == "-cfg" ]; then +if [ "$1" = "-cfg" ]; then config="$2"; shift 2 fi diff --git a/lib/misc/adddownload.sh b/lib/misc/adddownload.sh index bd8316f..09ae080 100644 --- a/lib/misc/adddownload.sh +++ b/lib/misc/adddownload.sh @@ -27,7 +27,7 @@ fi confdir=$( echo package/*/$1 ) package=$1; shift rep="$( echo $confdir | cut -d'/' -f 2 )" -if [ "$rep" == "*" ]; then +if [ "$rep" = "*" ]; then echo "failed" echo -e "\tpackage $package doesn't exist!\n" exit diff --git a/lib/misc/cacheinjector.sh b/lib/misc/cacheinjector.sh index af9003a..6a88698 100755 --- a/lib/misc/cacheinjector.sh +++ b/lib/misc/cacheinjector.sh @@ -15,7 +15,7 @@ # --- SDE-COPYRIGHT-NOTE-END --- config=default -if [ "$1" == "-cfg" ]; then +if [ "$1" = "-cfg" ]; then config="$2" shift; shift fi diff --git a/lib/misc/copypackage.sh b/lib/misc/copypackage.sh index 465e999..78d7f79 100755 --- a/lib/misc/copypackage.sh +++ b/lib/misc/copypackage.sh @@ -25,7 +25,7 @@ cppkg() { if [ -f $to/var/adm/flists/$pkg ]; then echo "$pkg: already present at target ($to)" cut -d' ' -f2- $to/var/adm/flists/$pkg | while read -r f; do - if [ "$f" == var/adm/flists/$pkg ]; then + if [ "$f" = "var/adm/flists/$pkg" ]; then true elif [ ! -d "$to/$f" ]; then rm -vf "$to/$f" diff --git a/lib/misc/showsorteddeps.sh b/lib/misc/showsorteddeps.sh index cedea7c..1356c98 100644 --- a/lib/misc/showsorteddeps.sh +++ b/lib/misc/showsorteddeps.sh @@ -18,7 +18,7 @@ cachefiles= packages= config=default -if [ "$1" == "-cfg" ]; then +if [ "$1" = "-cfg" ]; then config="$2" shift; shift fi diff --git a/lib/sde-download/mirror-test.sh b/lib/sde-download/mirror-test.sh index ad47dfe..41254f7 100644 --- a/lib/sde-download/mirror-test.sh +++ b/lib/sde-download/mirror-test.sh @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: lib/sde-download/mirror-test.sh -# Copyright (C) 2006 - 2007 The OpenSDE Project +# Copyright (C) 2006 - 2008 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -38,7 +38,7 @@ while read name country admin url ; do sed -e 's:,:.:' -e 's:[\.,]...$::' )" # compare - if [ "${speed:-0}" == "0" ]; then + if [ "${speed:-0}" = "0" ]; then echo ' failed' 1>&2 else echo " $speed B/s" 1>&2 diff --git a/lib/sde-package/new-freshmeat.sh b/lib/sde-package/new-freshmeat.sh index 97b352b..5df8703 100644 --- a/lib/sde-package/new-freshmeat.sh +++ b/lib/sde-package/new-freshmeat.sh @@ -151,7 +151,7 @@ read_fm_config() { fi } -if [ "$1" == "-main" ] ; then +if [ "$1" = "-main" ] ; then create_main=1 shift fi @@ -265,7 +265,7 @@ fi echo "ok" echo -n "Creating $package.conf ... " -if [ "$create_main" == "1" ] ; then +if [ "$create_main" = "1" ] ; then cat >>$package.conf <<-EOF ${package}_main() { : TODO diff --git a/lib/sde-package/new.in b/lib/sde-package/new.in index e17a4e2..27a22e9 100644 --- a/lib/sde-package/new.in +++ b/lib/sde-package/new.in @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: lib/sde-package/new.in -# Copyright (C) 2006 - 2007 The OpenSDE Project +# Copyright (C) 2006 - 2008 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -30,7 +30,7 @@ package_new() { if [ ! -d "${new_repository}" ]; then # uhm, it doesn't exist yet - if [ "$new_repository" == "${new_repository//\//}" ]; then + if [ "$new_repository" = "${new_repository//\//}" ]; then # uh, just a repo name new_repository="$SDEROOT/package/$new_repository" elif [ -d "$SDEROOT/${new_repository%/*}" ]; then @@ -55,7 +55,7 @@ package_new() { fi # on this tree, and at package/ - [ "${new_repository%/*}" == "$SDEROOT/package" ] || + [ "${new_repository%/*}" = "$SDEROOT/package" ] || echo_abort 1 "invalid repository location. (${new_repository%/*})" if [ ! -d "$new_repository" ]; then diff --git a/lib/sde-package/new.sh b/lib/sde-package/new.sh index dac2b64..5b208cf 100644 --- a/lib/sde-package/new.sh +++ b/lib/sde-package/new.sh @@ -1,14 +1,14 @@ #!/bin/bash # --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# +# # Filename: lib/sde-package/new.sh -# Copyright (C) 2006 - 2007 The OpenSDE Project +# Copyright (C) 2006 - 2008 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 1998 - 2003 Clifford Wolf -# +# # More information can be found in the files COPYING and README. -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. A copy of the @@ -27,7 +27,7 @@ # if -main is specified. # -if [ "$1" == "-main" ] ; then +if [ "$1" = "-main" ] ; then create_main=1 shift fi @@ -128,7 +128,7 @@ echo >> $confdir/$package.desc echo "ok" echo -n "Creating $package.conf ... " -if [ "$create_main" == "1" ] ; then +if [ "$create_main" = "1" ] ; then cat >>$confdir/$package.conf <<-EEE ${package}_main() { : TODO