-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andrea Dainese
committed
Aug 19, 2015
1 parent
f13affd
commit 5cd95cc
Showing
5 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.9.0-67 | ||
0.9.0-68 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
if [ $# -ne 1 ]; then | ||
echo 'ERROR: wrong options given.' | ||
exit 15 | ||
fi | ||
|
||
if [ ! -f ${1} ]; then | ||
echo 'ERROR: file does not exist.' | ||
exit 15 | ||
fi | ||
|
||
TEMP=$(mktemp -d --suffix=_unetlab) | ||
unzip -q -o -d ${TEMP} ${1} "*.unl" | ||
if [ $? -ne 0 ]; then | ||
rm -rf ${TEMP} | ||
echo 'ERROR: cannot unzip file.' | ||
exit 15 | ||
fi | ||
|
||
find ${TEMP} -name "*.unl" -exec sed -i 's/ id="[0-9a-f-]\{36\}"//g' '{}' \; | ||
if [ $? -ne 0 ]; then | ||
rm -rf ${TEMP} | ||
echo 'ERROR: cannot remove lab UUID.' | ||
exit 15 | ||
fi | ||
|
||
cd ${TEMP} | ||
|
||
zip -q -r -u ${1} * | ||
if [ $? -ne 0 ]; then | ||
rm -rf ${TEMP} | ||
echo 'ERROR: cannot update files.' | ||
exit 15 | ||
fi | ||
|
||
exit 0 |