__ungleich_nextcloud/gencode-remote

41 lines
1,003 B
Text
Raw Normal View History

2017-04-21 04:57:03 +00:00
#!/bin/sh
os=$(cat "$__global/explorer/os")
if [ ! "$os" = "debian" ]
then
echo "OS $os is currently not supported." >&2
exit 1
fi
os_version=$(cat "$__global/explorer/os_version")
case "$os_version" in
8*)
:
;;
2017-04-22 08:23:06 +00:00
9*)
:
;;
2017-04-21 04:57:03 +00:00
*)
echo "Unsupported version $os_version of $os." >&2
exit 1
;;
esac
2017-04-23 06:16:43 +00:00
nextcloud_url=$(cat "$__object/parameter/url")
if [ ! "${nextcloud_url}" ]
2017-04-21 04:57:03 +00:00
then
2017-04-23 06:16:43 +00:00
echo "Missing nextcloud uri (parameter/url)" >&2
2017-04-21 04:57:03 +00:00
exit 1
fi
2017-04-23 06:16:43 +00:00
nextcloud_version=$(cat "$__object/parameter/version")
if [ ! "${nextcloud_version}" ]
then
echo "Missing nextcloud version (parameter/version)" >&2
exit 1
fi
2017-04-23 06:22:31 +00:00
nextcloud_uri="${nextcloud_url}-${nextcloud_version}.tar.bz2"
2017-04-23 06:16:43 +00:00
# Download tar ball extract and apply script
# TODO: verify shasum of tar ball
2017-04-21 04:57:03 +00:00
curl -LO ${nextcloud_uri} -o ${nextcloud_dir}/nextcloud.tar.bz2
tar -C /var/www -xvjf ${nextcloud_dir}/nextcloud.tar.bz2
rm ${nextcloud_dir}/nextcloud.tar.bz2
2017-04-23 06:28:55 +00:00
bash ${__type}/files/nextcloud.sh