Commit 9627c74b authored by Roman Haefeli's avatar Roman Haefeli
Browse files

windows: get netpd and instruments from git; update .htaccess

parent acccd3c4
#!/bin/bash
app_name="netpd"
app_version="2.3.0"
package_version=$(date +%Y-%m-%d)
src_url="https://github.com/reduzent/netpd"
# Pd
pd_archive_file=~/Downloads/pd-0.51-4.msw.zip
......@@ -18,17 +18,24 @@ ext_urls+=("http://puredata.info/Members/rdz/software/slip/0.1~git20181006/slip%
ext_urls+=("http://puredata.info/Members/zmoelnigbot/software/zexy/2.3.1/zexy%5Bv2.3.1%5D(Darwin-amd64-32)(Linux-amd64-32)(Linux-arm64-32)(Linux-armv7-32)(Linux-i386-32)(Windows-amd64-32)(Windows-i386-32).dek")
ext_urls+=("https://puredata.info/downloads/kiosk-plugin/releases/1.0/kiosk-plugin.zip")
# netpd bundle
netpd_bundle_url="https://www.netpd.org/~roman/netpd-plus-instruments-beta.zip"
# workdir
work_dir="${app_name}-${app_version}"
work_dir="${app_name}"
function fail {
echo "abort due some error"
exit 1
}
# get netpd and extract version
(
cd "$(dirname "$0")"
mkdir -p "${work_dir}"
cd "${work_dir}"
git clone --recursive ${src_url} || fail
) || fail
app_version=$(sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' "$(dirname $0)/${work_dir}/netpd/includes/netpd-meta.pd") || fail
# do stuff
(
cd "$(dirname "$0")"
......@@ -59,13 +66,9 @@ function fail {
) || fail
# install netpd
(
cd pd-netpd
curl --fail -s -o file "${netpd_bundle_url}" || fail
unzip -q file && rm file || fail
mv netpd/instruments .. || fail
) || fail
rm -rf netpd/.git netpd/.gitignore netpd/.gitmodules netpd/instruments/.git
mv netpd/instruments . || fail
mv netpd pd-netpd
) || fail
# apply patch to load netpd at start
......@@ -79,17 +82,23 @@ function fail {
# copy README
cp files/README.txt.win "${work_dir}/README.txt" || fail
# create version file
echo "${app_version} (${package_version})" > "${work_dir}/VERSION.txt"
#echo "${app_version} (${package_version})" > "${work_dir}/VERSION.txt"
# rename work_dir
mv ${work_dir} "${app_name}-${app_version}"
# create archive
zip -q -r "${app_name}-${app_version}_windows_${package_version}.zip" "${app_name}-${app_version}"
zip -q -r "${app_name}-${app_version}-windows-${package_version}.zip" "${app_name}-${app_version}"
# upload bundle
scp -q "${app_name}-${app_version}_windows_${package_version}.zip" all@netpd.org:public_html/software/
scp -q "${app_name}-${app_version}-windows-${package_version}.zip" all@netpd.org:public_html/software/
# clean up
rm -rf "${work_dir}" "${app_name}-${app_version}_windows_${package_version}.zip"
rm -rf "${app_name}-${app_version}" "${app_name}-${app_version}-windows-${package_version}.zip"
# create shortcut to latest
ssh all@netpd.org ln -f -s "${app_name}-${app_version}_windows_${package_version}.zip" "public_html/software/${app_name}-${app_version}_windows.zip" || fail
ssh all@netpd.org ln -f -s "${app_name}-${app_version}-windows-${package_version}.zip" "public_html/software/${app_name}-${app_version}-windows.zip" || fail
# update redirect target in .htaccess
ssh all@netpd.org sed -i "1s/[0-9]\.[0-9]\.[0-9]/${app_version}/" public_html/software/.htaccess || fail
)
Supports Markdown
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