mirror of
git://soft.sys114.com/odroid-stamper
synced 2025-12-19 01:48:42 +09:00
command: add command flag '--output=*' to set output directory
$ ./odroid-stamper --output=$PWD/output Signed-off-by: Dongjin Kim <tobetter@gmail.com> Change-Id: I9253d925cd406bb39c1486d4b1535c80bcf7e56a
This commit is contained in:
@@ -2,6 +2,14 @@
|
||||
|
||||
#set -x
|
||||
|
||||
usage() {
|
||||
echo "Usage: $(basename $0) [--help] [--output=<path>]"
|
||||
echo
|
||||
echo " --help: this help message"
|
||||
echo " --output=<path>: output directory for image files."
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ -z "$1" ] || CUSTOMOS=${1}
|
||||
|
||||
ODROID_STAMPER_DIR="/usr/share/odroid-stamper"
|
||||
@@ -15,6 +23,17 @@ DEFAULT_CONFIG=${WORKDIR}/.config
|
||||
download_dir="/var/cache/odroid-stamper/downloads"
|
||||
out_dir=${WORKDIR}
|
||||
|
||||
for opt in "$@"; do
|
||||
case $opt in
|
||||
--help)
|
||||
usage
|
||||
;;
|
||||
--output=*)
|
||||
out_dir="${opt#*=}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
. ${TOPDIR}/menu
|
||||
. ${TOPDIR}/default
|
||||
. ${TOPDIR}/functions
|
||||
|
||||
Reference in New Issue
Block a user