From 7d861077413e4bf1bfe266e13b5542e9c21d03b1 Mon Sep 17 00:00:00 2001 From: Yifan Liao Date: Thu, 31 Aug 2017 15:42:43 -0700 Subject: [PATCH] Add option to specify log and bb files directory --- disk-burnin.sh | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/disk-burnin.sh b/disk-burnin.sh index 43a29de..ada400c 100755 --- a/disk-burnin.sh +++ b/disk-burnin.sh @@ -136,6 +136,12 @@ Options: --notest Needed to actually run the tests, By default $0 will just do a dry run. + +--logdir + Log files directory + +--bbdir + Bad blocks files directory ... " @@ -146,7 +152,7 @@ if [[ $? -ne 4 ]]; then fi SHORT=h -LONG=help,notest +LONG=help,notest,logdir:,bbdir: PARSED=$(getopt --options $SHORT --longoptions $LONG --name "$0" -- "$@") if [[ $? -ne 0 ]]; then @@ -155,6 +161,8 @@ fi eval set -- "$PARSED" +Log_Dir="." +BB_Dir="." Dry_Run=1 while [ $# -gt 0 ]; do @@ -163,6 +171,14 @@ while [ $# -gt 0 ]; do Dry_Run=0 exit 0 ;; + --logdir) + Log_Dir="$2" + shift + ;; + --bbdir) + BB_Dir="$2" + shift + ;; -h | --help) echo "$USAGE" exit 0 @@ -183,12 +199,6 @@ fi Drive=$1 -# Directory specifiers for log and badblocks data files. Leave off the -# trailing slash: - -Log_Dir="." -BB_Dir="." - ######################################################################## # # Prologue