Sha256: 02530fea4028dff3d4fa031f81cf91911eb7fb71d11a9098d0c69f923ae76f9a
Contents?: true
Size: 1013 Bytes
Versions: 2
Compression:
Stored size: 1013 Bytes
Contents
#!/bin/sh # The group name might not have a trailing newline, depending on the # syntax the user used in their tpkg.xml/tpkg.yml file. read treats # that as an error, although it will still read the name fine. So if # the read is after the "set -e" then the script aborts. We could work # around it by dumping stdin to a file and reading from there, but that # seems lame. read group set -e pkgfile=$1 operation=$2 # Discard any remaining data fed to us so as not to trigger a # SIGPIPE in the caller. cat > /dev/null case "$operation" in 'install') if ! grep ^$group: /etc/group > /dev/null 2>&1 then groupadd $group fi ;; 'remove') # We have no way to know if this package is the only reason this # group is on the system. It could have been requested by other # packages, or added by something outside of tpkg. So just warn # the user that we're leaving it behind. echo "tpkg local external leaving behind group $group from $pkgfile" ;; *) echo "$0: Invalid arguments" exit 1 ;; esac
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tpkg-2.3.5 | externals/group |
tpkg-2.3.4 | externals/group |