Browse Source

Fixed bin/* to use = instead of == on [ calls, because dash doesn't support ==

karasz/new-early
Alejandro Mery 18 years ago
parent
commit
94be70df75
10 changed files with 28 additions and 28 deletions
  1. +3
    -3
      bin/sde
  2. +2
    -2
      bin/sde-commit
  3. +2
    -2
      bin/sde-config-ini
  4. +4
    -4
      bin/sde-download
  5. +5
    -5
      bin/sde-download2
  6. +2
    -2
      bin/sde-install
  7. +2
    -2
      bin/sde-list-download
  8. +6
    -6
      bin/sde-list-files
  9. +1
    -1
      bin/sde-update
  10. +1
    -1
      bin/sde-update-package

+ 3
- 3
bin/sde

@ -59,12 +59,12 @@ fi
# switching to the right sde wrapper (SDEROOT specific)
#
if [ "$( readlink -f "$0" )" != "$SDEROOT/bin/sde" ]; then
if [ "$1" == "--loop" ]; then
if [ "$1" = "--loop" ]; then
echo_abort 2 'loop detected, abort.'
else
exec "$SDEROOT/bin/sde" --loop "$@"
fi
elif [ "$1" == "--loop" ]; then
elif [ "$1" = "--loop" ]; then
shift
fi
@ -73,7 +73,7 @@ fi
. "$SDEROOT/lib/libsde.in"
. "$SDEROOT/lib/sde-wrapper-command.in"
if [ $# -eq 0 -o "$1" == "--help" ]; then
if [ $# -eq 0 -o "$1" = "--help" ]; then
sde_wrapper_command_help
else
command="$( sde_wrapper_command "$1" )"

+ 2
- 2
bin/sde-commit

@ -3,7 +3,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: bin/sde-commit
# Copyright (C) 2006 - 2007 The OpenSDE Project
# Copyright (C) 2006 - 2008 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
@ -76,7 +76,7 @@ locations=$( $SDEROOT/bin/sde-list-files --roots "$@" )
# we only accept one root at the time
roots=$( echo "$locations" | cut -d' ' -f1 | sort -u )
root=$( echo "$roots" | head -n 1 )
[ "$root" == "$roots" ] || echo_abort 1 "Locations from multiple repositories given, aborting."
[ "$root" = "$roots" ] || echo_abort 1 "Locations from multiple repositories given, aborting."
# $root relative locations
locations=$( echo "$locations" | cut -d' ' -f2 )

+ 2
- 2
bin/sde-config-ini

@ -3,7 +3,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: bin/sde-config-ini
# 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.
#
@ -160,7 +160,7 @@ for item; do
[ "$section" != "$key" ] || key=
# choose an action
if [ "$value" == "$item" ]; then
if [ "$value" = "$item" ]; then
if [ -n "$delete" ]; then
action='delete'
else

+ 4
- 4
bin/sde-download

@ -207,7 +207,7 @@ detect_mirror() {
if [ -z "$mirror" ]; then
echo_error "Mirror detection loop hit a bug!"
elif [ "$mirror" == "broken" ]; then
elif [ "$mirror" = "broken" ]; then
echo_warning "No Mirror Found!"
else
echo_info "Using mirror <$mirror>."
@ -230,7 +230,7 @@ download_file() {
# Tarball file name:
bzfile="`bz2filename "$gzfile"`"
# Remove optional '-' prefix from $location
[ "${location:0:1}" == '-' ] && location="${location:1}"
[ "${location:0:1}" = '-' ] && location="${location:1}"
# Lock file name:
lkfile="tmp/down.lockfile.`echo $bzfile | tr / -`"
@ -537,13 +537,13 @@ download_file_now() {
touch $HOME/.cvspass
;;
svn|svn\+http)
if [ "$protocol" == "svn+http" ]; then
if [ "$protocol" = "svn+http" ]; then
url="http://$url"
else
url="svn://$url"
fi
if [ "${options:0:1}" == "-" ]; then
if [ "${options:0:1}" = "-" ]; then
# the module is the last dir of $url
module="${url##*/}"
else

+ 5
- 5
bin/sde-download2

@ -3,7 +3,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: bin/sde-download2
# Copyright (C) 2007 The OpenSDE Project
# Copyright (C) 2007 - 2008 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -120,7 +120,7 @@ while [ $# -gt 0 ]; do
esac ;;
--alt-dir)
shift
if [ "$1" == "none" -o -z "$1" ]; then
if [ "$1" = "none" -o -z "$1" ]; then
altdir=
$SDEROOT/bin/sde-config-ini --file=$SDESETTINGS --delete "download.altdir"
elif [ -d "$1/" ]; then
@ -200,7 +200,7 @@ esac | while read pkg cksum file location; do
# a file was found, what should I do with it?
[ $verbose -le 0 ] || echo_info "$pkg:${file##*/} found in $altfile ($mode)."
[ "$check" == "always" ] || check_this=no
[ "$check" = "always" ] || check_this=no
case "$mode" in
hardlink) cp -lf "$altfile" "$tmpfile" ;;
@ -234,9 +234,9 @@ esac | while read pkg cksum file location; do
# validate the file against the known checksum
#
if [ -s "$tmpfile" -a "$check_this" == "yes" -a "$cksum" != "X" ]; then
if [ -s "$tmpfile" -a "$check_this" = "yes" -a "$cksum" != "X" ]; then
cksum_real=$( sh $SDEROOT/lib/sde-download/cksum.sh $tmpfile | cut -d' ' -f2 )
if [ "$cksum" == "0" ]; then
if [ "$cksum" = "0" ]; then
echo_warning "$pkg:${file##*/} is missing a checksum value, ignoring. ($cksum_real)"
elif [ "$cksum" != "$cksum_real" ]; then
echo_error "$pkg:${file##*/} has a wrong checksum, failing. ($cksum != $cksum_real)"

+ 2
- 2
bin/sde-install

@ -3,7 +3,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: bin/sde-install
# 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.
#
@ -34,7 +34,7 @@ EOT
if [ $# -ne 0 ]; then
install_usage
elif [ -L "$HOME/bin/sde" ]; then
if [ "$( readlink -f $HOME/bin/sde )" == "$SDEROOT/bin/sde" ]; then
if [ "$( readlink -f $HOME/bin/sde )" = "$SDEROOT/bin/sde" ]; then
echo_warning "the same sde wrapper is already installed, skip."
else
echo_warning "sde wrapper already installed [$( readlink -f $HOME/bin/sde )]"

+ 2
- 2
bin/sde-list-download

@ -3,7 +3,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: bin/sde-list-download
# Copyright (C) 2007 The OpenSDE Project
# Copyright (C) 2007 - 2008 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -92,7 +92,7 @@ $SDEROOT/bin/sde-list-pkg ${config:+-c $config} ${extenders:+-e} ${repositories:
if [ "$location" != "${location#!}" ]; then
# keep untouched
source="${location#!}"
elif [ "$location" == "${location% *}" -a "$location" != "${location%/}" ]; then
elif [ "$location" = "${location% *}" -a "$location" != "${location%/}" ]; then
# no spaces, and trailing '/', append gzfile
source="${location}${gzfile}"
else

+ 6
- 6
bin/sde-list-files

@ -3,7 +3,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: bin/sde-list-files
# Copyright (C) 2007 The OpenSDE Project
# Copyright (C) 2007 - 2008 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -59,7 +59,7 @@ print_error() { echo "$@" >&2; }
print_file() {
local file="$1"
if [ "$file" == "$SDEROOT" ]; then
if [ "$file" = "$SDEROOT" ]; then
[ -n "$show_absolute_path" ] || file="."
else
[ -n "$show_absolute_path" ] || file="${file#$SDEROOT/}"
@ -72,7 +72,7 @@ print_file() {
print_file_root() {
local file="$1" root="$2" # $file arrives relative
if [ "$root" == "." -a -n "$show_absolute_path" ]; then
if [ "$root" = "." -a -n "$show_absolute_path" ]; then
root="$SDEROOT"
fi
@ -81,10 +81,10 @@ print_file_root() {
for x; do
y=
if [ "$x" == "." ]; then
if [ "$x" = "." ]; then
# $PWD, explicitly
y="$PWD"
elif [ "${x:0:1}" == "/" -a -e "$x" ]; then
elif [ "${x:0:1}" = "/" -a -e "$x" ]; then
# absolute
y="$x"
elif [ -e "$SDEROOT/package"/*/"$x" ]; then
@ -108,7 +108,7 @@ for x; do
if [ -z "$y" ]; then
# missing
print_error "$x: not found."
elif [ "$y" == "$SDEROOT" ]; then
elif [ "$y" = "$SDEROOT" ]; then
# uh, the root itself
if [ -n "$show_roots" ]; then
print_file_root "." "."

+ 1
- 1
bin/sde-update

@ -27,7 +27,7 @@ command='update'
if [ $# -eq 0 ]; then
# assuming default
discriminator='tree'
elif [ "$1" == "--help" ]; then
elif [ "$1" = "--help" ]; then
sde_wrapper_discriminator_help "$command"
exit 1
else

+ 1
- 1
bin/sde-update-package

@ -118,7 +118,7 @@ update_package_md5() {
shift
echo_info "Loading MD5 file from '$md5'"
if [ "$1" == "--no-location" ]; then
if [ "$1" = "--no-location" ]; then
nolocation=yes; shift
echo_info "(Using individual download locations)"
fi

Loading…
Cancel
Save