source: projects/setup/trunk/uidgidlint @ 8718

Revision 8718, 715 bytes checked in by daisuke, 8 years ago (diff)

update to 2.9.0

  • Property svn:executable set to *
Line 
1#!/bin/sh
2# We need a file to look at.
3if [ -z "$*" ] ; then
4        echo Usage: `basename $0` uidgid
5        exit 1
6fi
7error=0
8# The format of the file is (currently)
9for infile in "$@" ; do
10        uidlist=`tail -n +2 "$infile" | awk '{print $2}' | grep -v '?' | grep -v -e - | sort -nu`
11        gidlist=`tail -n +2 "$infile" | awk '{print $3}' | grep -v '?' | grep -v -e - | sort -nu`
12        for uid in $uidlist ; do
13                if test `tail -n +2 "$infile" | awk '{print $2}' | grep '^'"$uid"'$' | wc -l` -ne 1 ; then
14                        echo Duplicate UID: $uid
15                        error=1
16                fi
17        done
18        for gid in $gidlist ; do
19                if test `tail -n +2 "$infile" | awk '{print $3}' | grep '^'"$gid"'$' | wc -l` -ne 1 ; then
20                        echo Duplicate GID: $gid
21                        error=1
22                fi
23        done
24done
25exit $error
Note: See TracBrowser for help on using the repository browser.