-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Valentin Popov <info@valentineus.link>
- Loading branch information
1 parent
bdaf1d3
commit 3fa97ba
Showing
4 changed files
with
68 additions
and
51 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
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,21 +1,32 @@ | ||
#!/bin/sh | ||
# Author: Valentin Popov | ||
# Email: info@valentineus.link | ||
# Date: 2017-10-19 | ||
# Usage: /bin/sh build.sh | ||
# Date: 2018-06-19 | ||
# Usage: /bin/sh ./build.sh | ||
# Description: Build the final package for installation in Moodle. | ||
|
||
# Updating the Environment | ||
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" | ||
export PATH="$PATH:/usr/local/scripts" | ||
|
||
# Build the package | ||
cd .. | ||
mv "./moodle-webhooks" "./local_webhooks" | ||
zip -9 -r "local_webhooks.zip" "local_webhooks" \ | ||
-x "local_webhooks/.git*" \ | ||
-x "local_webhooks/.travis.yml" \ | ||
-x "local_webhooks/build.sh" | ||
# Current project | ||
PROJECT="local_webhooks" | ||
|
||
# Defining directories | ||
DIRECTORY="$(pwd)" | ||
NAMEDIR="$(basename $DIRECTORY)" | ||
TMPDIR="$(mktemp --directory)" | ||
|
||
# Creating a Temporary Directory | ||
cp --recursive --verbose "../$NAMEDIR" "$TMPDIR/$PROJECT" | ||
mkdir --parents --verbose "$DIRECTORY/build" | ||
cd "$TMPDIR" | ||
|
||
# Creating an archive | ||
zip -9 -r "$DIRECTORY/build/$PROJECT.zip" "$PROJECT" \ | ||
-x "$PROJECT/.git*" \ | ||
-x "$PROJECT/.travis.yml" \ | ||
-x "$PROJECT/build*" | ||
|
||
# End of work | ||
exit 0 |
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