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
ddfcdc0a
Commit
ddfcdc0a
authored
Mar 15, 2015
by
Richard Torenvliet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add .gz as an extension, and copy submit txt to the submitters dir
parent
66634ab0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
bb_extract
bb_extract
+7
-2
No files found.
bb_extract
View file @
ddfcdc0a
...
@@ -42,6 +42,7 @@ function extract() {
...
@@ -42,6 +42,7 @@ function extract() {
case $ARCHIVE in
case $ARCHIVE in
*.tar.bz2) tar xvjf $ARCHIVE -C $OUTPUT;;
*.tar.bz2) tar xvjf $ARCHIVE -C $OUTPUT;;
*.tar.gz) tar xvzf $ARCHIVE -C $OUTPUT;;
*.tar.gz) tar xvzf $ARCHIVE -C $OUTPUT;;
*.gz) tar xvzf $ARCHIVE -C $OUTPUT;;
*.rar) unrar x $ARCHIVE $OUTPUT ;;
*.rar) unrar x $ARCHIVE $OUTPUT ;;
*.tar) tar xvf $ARCHIVE -C $OUTPUT;;
*.tar) tar xvf $ARCHIVE -C $OUTPUT;;
*.tbz2) tar xvjf $ARCHIVE -C $OUTPUT;;
*.tbz2) tar xvjf $ARCHIVE -C $OUTPUT;;
...
@@ -72,7 +73,11 @@ function find_and_unpack() {
...
@@ -72,7 +73,11 @@ function find_and_unpack() {
SUBMIT_NAME=$OUTPUT_DIR/`head -1 $PREFIX.txt| cut -d " " -f2,3,4,5,6 | \
SUBMIT_NAME=$OUTPUT_DIR/`head -1 $PREFIX.txt| cut -d " " -f2,3,4,5,6 | \
sed -e "s/\ /_/g;s/(//g;s/)//g;" | awk '{print tolower($0)}'`
sed -e "s/\ /_/g;s/(//g;s/)//g;" | awk '{print tolower($0)}'`
mkdir -p $SUBMIT_NAME
mkdir -p $SUBMIT_NAME
# cp txt to submitters DIR
cp $i $SUBMIT_NAME
FIND_PREFIX=`basename $PREFIX`
FIND_PREFIX=`basename $PREFIX`
ARCHIVE_LIST=`find $INPUT_DIR -name "$FIND_PREFIX\_*.tar.gz" \
ARCHIVE_LIST=`find $INPUT_DIR -name "$FIND_PREFIX\_*.tar.gz" \
-o -name "$FIND_PREFIX\_*.tar"\
-o -name "$FIND_PREFIX\_*.tar"\
...
@@ -110,7 +115,7 @@ function create_directory() {
...
@@ -110,7 +115,7 @@ function create_directory() {
mkdir -p $1
mkdir -p $1
}
}
#Help function
#
Help function
function HELP {
function HELP {
echo -e \\n"Help documentation for ${SCRIPT}."\\n
echo -e \\n"Help documentation for ${SCRIPT}."\\n
echo -e "Basic usage: $SCRIPT gradebook.zip"\\n
echo -e "Basic usage: $SCRIPT gradebook.zip"\\n
...
...
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