Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
blackboard-extractor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Richard Torenvliet
blackboard-extractor
Commits
5733bc9e
Commit
5733bc9e
authored
Nov 24, 2014
by
Richard Torenvliet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename and corrected help
parent
ec1c0da8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
bb_extract
bb_extract
+7
-9
No files found.
extract.sh
→
bb_extract
View file @
5733bc9e
...
@@ -114,25 +114,23 @@ function create_directory() {
...
@@ -114,25 +114,23 @@ function create_directory() {
#Help function
#Help function
function HELP {
function HELP {
echo
-e
\\
n
"Help documentation for
${
BOLD
}${
SCRIPT
}
.
${
NORM
}
"
\\
n
echo -e \\n"Help documentation for ${
SCRIPT}.
"\\n
echo
-e
"
${
REV
}
Basic usage:
${
NORM
}
${
BOLD
}
$SCRIPT
file.ext
${
NORM
}
"
\\
n
echo -e "
Basic usage: $SCRIPT gradebook.zip
"\\n
echo "Command line switches are optional. The following switches are recognized."
echo "Command line switches are optional. The following switches are recognized."
echo
"
${
REV
}
-d
${
NORM
}
--Set output directory
${
BOLD
}
a
${
NORM
}
. Default
\n\
echo "-d --Set output directory. ${BOLD}$OUTPUT_DIR${NORM}."
is
${
BOLD
}
/tmp/blackboard
${
NORM
}
."
echo -e "-h --Displays this help message. No further functions are performed."\\n
echo
-e
"
${
REV
}
-h
${
NORM
}
--Displays this help message. No further functions are performed."
\\
n
echo -e "Example: ${BOLD}$SCRIPT -d assignment1 gradebook.zip${NORM}"\\n
echo
-e
"Example:
${
BOLD
}
$SCRIPT
-d /tmp/assignment1 gradebook.zip
${
NORM
}
"
\\
n
exit 1
exit 1
}
}
#Check the number of arguments. If none are passed, print help and exit.
#Check the number of arguments. If none are passed, print help and exit.
NUMARGS=$#
NUMARGS=$#
echo
-e
\\
n
"Number of arguments:
$NUMARGS
"
if [ $NUMARGS -eq 0 ]; then
if [ $NUMARGS -eq 0 ]; then
HELP
HELP
fi
fi
while
getopts
:d:h
:
FLAG
;
do
while getopts :d:h FLAG; do
case $FLAG in
case $FLAG in
d)
d)
OUTPUT_DIR=$OPTARG
OUTPUT_DIR=$OPTARG
...
@@ -140,7 +138,7 @@ while getopts :d:h: FLAG; do
...
@@ -140,7 +138,7 @@ while getopts :d:h: FLAG; do
h) #show help
h) #show help
HELP
HELP
;;
;;
\?
)
#unrecognized option - show help
\?)
echo -e \\n"Option -${BOLD}$OPTARG${NORM} not allowed."
echo -e \\n"Option -${BOLD}$OPTARG${NORM} not allowed."
HELP
HELP
;;
;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment