~ubuntu-branches/ubuntu/breezy/nbd/breezy-security

« back to all changes in this revision

Viewing changes to install-sh

  • Committer: Bazaar Package Importer
  • Author(s): Wouter Verhelst
  • Date: 2005-05-07 11:37:20 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050507113720-1fjynvdkq7va9nj9
Tags: 1:2.7.4-1
New upstream release. Contains patches from Roy Keene to make it all work
a tad bit more reliable (thanks, Roy!)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
# install - install a program, script, or datafile
3
3
 
4
 
scriptversion=2004-10-22.00
 
4
scriptversion=2005-02-02.21
5
5
 
6
6
# This originates from X11R5 (mit/util/scripts/install.sh), which was
7
7
# later released in X11R6 (xc/config/util/install.sh) with the
109
109
        shift
110
110
        continue;;
111
111
 
112
 
    --help) echo "$usage"; exit 0;;
 
112
    --help) echo "$usage"; exit $?;;
113
113
 
114
114
    -m) chmodcmd="$chmodprog $2"
115
115
        shift
134
134
        shift
135
135
        continue;;
136
136
 
137
 
    --version) echo "$0 $scriptversion"; exit 0;;
 
137
    --version) echo "$0 $scriptversion"; exit $?;;
138
138
 
139
139
    *)  # When -d is used, all remaining arguments are directories to create.
140
140
        # When -t is used, the destination is already specified.
296
296
               || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
297
297
               || {
298
298
                 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
299
 
                 (exit 1); exit
 
299
                 (exit 1); exit 1
300
300
               }
301
301
             else
302
302
               :
307
307
           $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
308
308
         }
309
309
    }
310
 
  fi || { (exit 1); exit; }
 
310
  fi || { (exit 1); exit 1; }
311
311
done
312
312
 
313
313
# The final little trick to "correctly" pass the exit status to the exit trap.
314
314
{
315
 
  (exit 0); exit
 
315
  (exit 0); exit 0
316
316
}
317
317
 
318
318
# Local variables: