-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
roughly translate the existing batch file to bash for ease of building under ubuntu
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
PROJDIR=$(dirname ${0}) # directory name of the build script | ||
|
||
# Configuration | ||
SOURCE=${PROJDIR}/YAFD | ||
TARGET=${PROJDIR}/publish # Copy the source here pefore building | ||
PLGX_LOC="/usr/lib/keepass2/Plugins" # Where to install the plugin | ||
KEEPASS=$(which keepass2) # keepass binary location | ||
NAME=YetAnotherFaviconDownloader | ||
|
||
|
||
# Clean old files | ||
echo Cleaning... | ||
if [ -d "${TARGET}" ]; then # remove the build dir | ||
rm -r ${TARGET} | ||
fi | ||
if [ -e publish.plgx ]; then # remove the compiled binary | ||
rm publish.plgx | ||
fi | ||
if [ -e ${NAME}.plgx ]; then # remove renamed binary | ||
rm ${NAME}.plgx | ||
fi | ||
|
||
# Copy the files needed to build the plugin | ||
echo Copying... | ||
cp -r ${SOURCE} ${TARGET} | ||
|
||
# Let KeePass do its magic | ||
echo Building... | ||
${KEEPASS} --plgx-create "${TARGET}" --plgx-prereq-kp:2.34 | ||
mv publish.plgx ${NAME}.plgx | ||
|
||
# Deploy PLGX file | ||
echo Deploying... | ||
sudo cp ${NAME}.plgx ${PLGX_LOC} |