Commit b801b709 authored by Matthew Smith's avatar Matthew Smith
Browse files

Create cache dir if it doesn't exist

parent 1b373c38
......@@ -41,6 +41,12 @@ function allocate_ip {
fi
}
function make_cache {
if [ ! -d "${CACHE_BUILDS}" ]; then
mkdir -p "${CACHE_BUILDS}"
fi
}
# make_pkcs12
# Generate a PKCS12 certificate bundle from the given
......
......@@ -65,6 +65,7 @@ dpkg-deb --build $WORKDIR ./$DEBFILE || exit
if [ -z "$CACHE_BUILDS" ] ; then
echo "Your OpenVPN Debian client has been built in `pwd`/$DEBFILE"
else
make_cache
mv ./${DEBFILE} "${CACHE_BUILDS}/${DEBFILE}"
echo "Your OpenVPN Debian client has been built in ${CACHE_BUILDS}/$DEBFILE"
fi
......
......@@ -64,6 +64,7 @@ if [ -z "$CACHE_BUILDS" ]; then
cp ${WORKDIR}/${FILEBASE}.ovpn ./$OVPNFILE
echo "Your OpenVPN generic client has been built in ${OVPNFILE}"
else
make_cache
cp ${WORKDIR}/${FILEBASE}.ovpn "${CACHE_BUILDS}/${OVPNFILE}"
echo "Your OpenVPN generic client has been built in ${CACHE_BUILDS}/${OVPNFILE}"
fi
......
......@@ -52,6 +52,7 @@ if [ -z "$CACHE_BUILDS" ]; then
mv $WORKDIR/sol1-openvpn-deploy.exe ./openvpn-${FILEBASE}.exe
echo "Your OpenVPN Windows client has been built in `pwd`/openvpn-${FILEBASE}.exe"
else
make_cache
mv $WORKDIR/sol1-openvpn-deploy.exe "${CACHE_BUILDS}/openvpn-${FILEBASE}.exe"
echo "Your OpenVPN Windows client has been built in ${CACHE_BUILDS}/openvpn-${FILEBASE}.exe"
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment