Skip to content

Commit

Permalink
simple linux build script
Browse files Browse the repository at this point in the history
roughly translate the existing batch file to bash for ease of building
under ubuntu
  • Loading branch information
apelly committed Mar 27, 2020
1 parent e3c6006 commit 3dbb664
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,5 @@ paket-files/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
*.pyc
/YetAnotherFaviconDownloader.plgx
36 changes: 36 additions & 0 deletions ubuntu-plgx-build.sh
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}

0 comments on commit 3dbb664

Please sign in to comment.