Preparing scripts for the "clean" target
This commit is contained in:
parent
2aeef1c22d
commit
420f0efc95
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#$Id$
|
||||
#Copyright (c) 2012 Pierre Pronchery <khorben@defora.org>
|
||||
#Copyright (c) 2012-2013 Pierre Pronchery <khorben@defora.org>
|
||||
#
|
||||
#Redistribution and use in source and binary forms, with or without
|
||||
#modification, are permitted provided that the following conditions are met:
|
||||
|
@ -46,16 +46,20 @@ _debug()
|
|||
#usage
|
||||
_usage()
|
||||
{
|
||||
echo "Usage: docbook.sh [-i|-u][-P prefix] target" 1>&2
|
||||
echo "Usage: docbook.sh [-c|-i|-u][-P prefix] target..." 1>&2
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
#main
|
||||
clean=0
|
||||
install=0
|
||||
uninstall=0
|
||||
while getopts "iuP:" "name"; do
|
||||
case "$name" in
|
||||
c)
|
||||
clean=1
|
||||
;;
|
||||
i)
|
||||
uninstall=0
|
||||
install=1
|
||||
|
@ -106,6 +110,9 @@ while [ $# -gt 0 ]; do
|
|||
;;
|
||||
esac
|
||||
|
||||
#clean
|
||||
[ "$clean" -ne 0 ] && continue
|
||||
|
||||
#uninstall
|
||||
if [ "$uninstall" -eq 1 ]; then
|
||||
$DEBUG $RM -- "$instdir/$target" || exit 2
|
||||
|
|
Loading…
Reference in New Issue
Block a user