-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Templatized addon.xml, small improvements of build script
- Loading branch information
1 parent
96fcd34
commit 4eb7c23
Showing
2 changed files
with
21 additions
and
7 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,8 +1,23 @@ | ||
#!/bin/bash | ||
|
||
VERSION=`git tag -l | tail -n1` | ||
DIR=video.kino.pub-$VERSION | ||
if [[ -d .git ]]; then | ||
VERSION=`git tag -l | tail -n1` | ||
elif [[ $# -eq 0 ]]; then | ||
echo "Current directory is not a git repository." | ||
echo "Provide a version as an argument." | ||
exit 1 | ||
else | ||
VERSION=$1 | ||
fi | ||
|
||
DIR=video.kino.pub-$VERSION | ||
|
||
mkdir $DIR | ||
cp -r resources addon.xml default.py icon.png $DIR | ||
zip -r -9 -m $DIR.zip $DIR > /dev/null | ||
echo "Copying the files to a temporary directory" | ||
echo "==========================================" | ||
VERSION=$VERSION envsubst < addon.xml > $DIR/addon.xml | ||
rsync -rv --exclude=*.pyc resources default.py icon.png $DIR | ||
echo | ||
echo "Creating the addon archive" | ||
echo "==========================" | ||
zip -rv -9 -m $DIR.zip $DIR |