~ubuntu-branches/ubuntu/trusty/abs-guide/trusty-proposed

« back to all changes in this revision

Viewing changes to abs/and-list2.sh

  • Committer: Package Import Robot
  • Author(s): Sandro Tosi
  • Date: 2012-06-03 10:57:27 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20120603105727-rm7frl4feikr2swm
Tags: 6.5-1
* New upstream release
* debian/watch
  - updated
* debian/abs-guide.lintian-overrides
  - updated for new upstream code
* debian/control
  - bump Standards-Version to 3.9.3 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
ARGS=1        # Number of arguments expected.
4
 
E_BADARGS=85  # Exit value if incorrect number of args passed.
5
 
 
6
 
test $# -ne $ARGS && \
7
 
#    ^^^^^^^^^^^^ condition #1
8
 
echo "Usage: `basename $0` $ARGS argument(s)" && exit $E_BADARGS
9
 
#                                             ^^
10
 
#  If condition #1 tests true (wrong number of args passed to script),
11
 
#+ then the rest of the line executes, and script terminates.
12
 
 
13
 
# Line below executes only if the above test fails.
14
 
echo "Correct number of arguments passed to this script."
15
 
 
16
 
exit 0
17
 
 
18
 
# To check exit value, do a "echo $?" after script termination.