~vibhavp/ubuntu/raring/spl/merge-from-debian

« back to all changes in this revision

Viewing changes to addline.sh

  • Committer: Bazaar Package Importer
  • Author(s): Gerfried Fuchs
  • Date: 2006-08-21 08:21:06 UTC
  • mto: (3.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20060821082106-6glercj8mn0un53l
Tags: upstream-1.0~pre2
ImportĀ upstreamĀ versionĀ 1.0~pre2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
if [ $# != 2 ]; then
 
4
        echo "Usage: $0 filename line" >&2
 
5
        exit 1
 
6
fi
 
7
 
 
8
if ! test -f "$1" || ! grep -Fxq "$2" "$1"; then
 
9
        echo "$2" >> "$1"
 
10
fi
 
11
 
 
12
exit 0
 
13