lsinitrd.sh: print usage for -?, -h
parent
38bbec3731
commit
f7bccf3724
10
lsinitrd.sh
10
lsinitrd.sh
|
@ -19,13 +19,19 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
[[ $# -le 2 ]] || { echo "Usage: $(basename $0) [-s] [<initramfs file> [<filename>]]" ; exit 1 ; }
|
usage()
|
||||||
|
{
|
||||||
|
echo "Usage: $(basename $0) [-s] [<initramfs file> [<filename>]]"
|
||||||
|
}
|
||||||
|
|
||||||
|
[[ $# -le 2 ]] || { usage ; exit 1 ; }
|
||||||
|
|
||||||
sorted=0
|
sorted=0
|
||||||
while getopts "s" opt; do
|
while getopts "s" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
s) sorted=1;;
|
s) sorted=1;;
|
||||||
\?) exit 1;;
|
h) usage; exit 0;;
|
||||||
|
\?) usage; exit 1;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $((OPTIND-1))
|
shift $((OPTIND-1))
|
||||||
|
|
Loading…
Reference in New Issue