Removed references to ARCH - messes up Linux makes!
authorAndrew DeFaria <Andrew@ClearSCM.com>
Wed, 31 Jul 2013 17:29:13 +0000 (10:29 -0700)
committerAndrew DeFaria <Andrew@ClearSCM.com>
Wed, 31 Jul 2013 17:29:13 +0000 (10:29 -0700)
bin/root
rc/bash_login [changed mode: 0755->0644]
rc/clearcase
rc/multisite

index acd936a..705b469 100755 (executable)
--- a/bin/root
+++ b/bin/root
@@ -31,7 +31,7 @@ else
 
   # Reset title and prompt
   # Note: I don't like doing this but an alias doesn't work...
-  if [ $ARCH = "sun" ]; then
+  if [ $ARCHITECTURE = "sun" ]; then
     id=/usr/xpg4/bin/id
   else
     id=id
old mode 100755 (executable)
new mode 100644 (file)
index 1a904f9..f39ebb3
 # (c) Copyright 2000-2005, Andrew@DeFaria.com, all rights reserved.
 #
 ################################################################################
-# Set ARCH, architecture of the machine
+# Set ARCHITECTURE of the machine
 KERNEL=$(uname -s)
 if [[ $KERNEL = CYGWIN* ]]; then
-  export ARCH=cygwin
+  export ARCHITECTURE=cygwin
 elif [ $KERNEL = "Linux" ]; then
-  export ARCH=linux
+  export ARCHITECTURE=linux
 elif [ $KERNEL = "SunOS" ]; then
-  export ARCH=sun
+  export ARCHITECTURE=sun
 elif [ $KERNEL = "FreeBSD" ]; then
-  export ARCH=$KERNEL
+  export ARCHITECTURE=$KERNEL
 else
-  export ARCH=''
+  export ARCHITECTURE=''
   echo "Warning: Unknown architecture ($KERNEL)"
 fi
 
 # Architectual differences (AKA Silly Sun)
-if [ $ARCH = "sun" ]; then
+if [ $ARCHITECTURE = "sun" ]; then
   alias id=/usr/xpg4/bin/id
   alias tr=/usr/xpg4/bin/tr
   
@@ -70,7 +70,7 @@ fi
 
 # System dependencies
 # Note: I don't like doing this but an alias doesn't work...
-if [ $ARCH = "sun" ]; then
+if [ $ARCHITECTURE = "sun" ]; then
   id=/usr/xpg4/bin/id
 else
   id=id
@@ -96,7 +96,7 @@ else
 fi
 
 # Source bash_completion (if present) (too slow for Windows)
-if [ -r /etc/bash_completion -a $ARCH != "cygwin" ]; then
+if [ -r /etc/bash_completion -a $ARCHITECTURE != "cygwin" ]; then
   source /etc/bash_completion
 fi
 
@@ -129,7 +129,7 @@ set +u
 shopt -s lithist
 
 # Aliases:
-if [ $ARCH = "FreeBSD" ]; then
+if [ $ARCHITECTURE = "FreeBSD" ]; then
   alias ls="ls -FG"
 else
   if [ -f ~/.rc/dircolors ]; then
@@ -138,7 +138,7 @@ else
     fi
   fi
 
-  if [ $ARCH = "sun" ]; then
+  if [ $ARCHITECTURE = "sun" ]; then
     # Ugh! --color doesn't work on braindead SUN
     alias ls="ls -F"
   else
@@ -150,7 +150,7 @@ alias ll="ls -la"
 alias whence="type -p"
 alias mroe=more
 
-if [ $ARCH = "cygwin" ]; then
+if [ $ARCHITECTURE = "cygwin" ]; then
   alias host=nslookup
 fi
 
index d2d8b0c..f651231 100644 (file)
 # (c) Copyright 2000-2011, ClearSCM, Inc., all rights reserved.
 #
 ################################################################################
-# Set ARCH, architecture of the machine
+# Set ARCHITECTURE of the machine
 KERNEL=$(uname -s)
 
 if [[ $KERNEL = CYGWIN* ]]; then
-  export ARCH=cygwin
+  export ARCHITECTURE=cygwin
   vobtagPrefix='\\\\\\\'
 elif [ $KERNEL = "Linux" ]; then
-  export ARCH=linux
+  export ARCHITECTURE=linux
 elif [ $KERNEL = "SunOS" ]; then
-  export ARCH=sun
+  export ARCHITECTURE=sun
 elif [ $KERNEL = "FreeBSD" ]; then
-  export ARCH=$KERNEL
+  export ARCHITECTURE=$KERNEL
 else
-  export ARCH=''
+  export ARCHITECTURE=''
   echo "Warning: Unknown architecture ($KERNEL)"
 fi
 
-if [ $ARCH = 'cygwin' ]; then
+if [ $ARCHITECTURE = 'cygwin' ]; then
   export CCHOME=$(cygpath -u "$(regtool get '/machine/SOFTWARE/Rational Software/RSINSTALLDIR' 2>/dev/null)"/Clearcase 2>/dev/null);
 else 
   export CCHOME="/opt/rational/clearcase"
@@ -53,7 +53,7 @@ export CLEARTOOL="$CCHOME/bin/cleartool"
 export CLEARCASE_BLD_HOST_TYPE="unix"
 
 if [ -f "$CCHOME/etc/utils/creds" ]; then
-  if [ $ARCH = 'cygwin' ]; then
+  if [ $ARCHITECTURE = 'cygwin' ]; then
     alias creds=$(cygpath "$CCHOME/etc/utils/creds")
   else 
     alias creds="$CCHOME/etc/utils/creds"
@@ -70,7 +70,7 @@ function scm {
 
   if [ -x "$CLEARTOOL" ]; then
     # Cleartool suddenly started appending ^M's (I think as of 7.1)
-    if [ $ARCH = 'cygwin' ]; then
+    if [ $ARCHITECTURE = 'cygwin' ]; then
       # Need to set pipefail to pick up the exit code from cleartool
       # otherwise we get the exit code from tr which is usually 0
       set -o pipefail
@@ -145,7 +145,7 @@ function lllock {
 
 # View related functions
 function setview {
-  if [ $ARCH = 'cygwin' ]; then
+  if [ $ARCHITECTURE = 'cygwin' ]; then
        if [[ $1 = -* ]]; then
          echo "The setview command with options is not supported on Windows"
          return
@@ -374,7 +374,7 @@ function vtree {
   if [ $# != 1 ]; then
     echo "vtree: Error: Must specify an element to view its version tree"
   else
-    if [ $ARCH = 'cygwin' ]; then
+    if [ $ARCHITECTURE = 'cygwin' ]; then
       scm lsvtree -g "$@"
     else
       xlsvtree "$@"
@@ -1667,7 +1667,7 @@ unlock \
 unreserve \
 "
 
-if [ $ARCH = 'cygwin' ]; then
+if [ $ARCHITECTURE = 'cygwin' ]; then
   _arch_policies="\
 POLICY_WIN_INT_SNAP \
 POLICY_WIN_DEV_SNAP \
@@ -1829,7 +1829,7 @@ function _vobs () {
   # We simply must rid ourselves of these bloody backlashes!!! And yet Clearcase
   # insists on retaining them. Let's strip them off, do our thing, then put them
   # back to backslashes when we output stuff.
-  if [ $ARCH = 'cygwin' ]; then
+  if [ $ARCHITECTURE = 'cygwin' ]; then
        if [ $# -eq 0 ]; then
          scm lsvob -short | sed 's:\\:\\\\\\\\:'
        else
@@ -3656,7 +3656,7 @@ $_global_opts \
   cur="${COMP_WORDS[COMP_CWORD]}"
   prev="${COMP_WORDS[COMP_CWORD-1]}"
 
-  if [[ $cur == -* && $ARCH != cygwin ]]; then
+  if [[ $cur == -* && $ARCHITECTURE != cygwin ]]; then
     COMPREPLY=($(compgen -W "$opts" -- $cur))
   elif [[ $cur == * ]]; then
        COMPREPLY=($(compgen -W "$(_views $cur)"))      
index 2c9a8c2..373cd90 100644 (file)
@@ -14,7 +14,7 @@
 # (c) Copyright 2000-2005, Andrew@DeFaria.com, all rights reserved.
 #
 ################################################################################
-if [ $ARCH = "cygwin" ]; then
+if [ $ARCHITECTURE = "cygwin" ]; then
   export MSHOME=$(cygpath -u "$(regtool get '/machine/SOFTWARE/Rational Software/RSINSTALLDIR' 2>/dev/null)" 2>/dev/null)
 else 
   export MSHOME=/opt/rational/clearcase/
@@ -31,7 +31,7 @@ if [ -x "$MULTITOOL" ]; then
   export CLEARCASE_BLD_HOST_TYPE=Windows
   export SLOGS=$LOGS/sync_logs
 
-  if [ $ARCH = "cygwin" ]; then
+  if [ $ARCHITECTURE = "cygwin" ]; then
     export SB="${MSHOME}var/shipping/ms_ship"
   else
     export SB="/var/adm/rational/clearcase/shipping/ms_ship"