Skip to content
Snippets Groups Projects
40-install 548 B
#!/usr/bin/with-contenv bash

ICECODER_VERSION=$(cat /version.txt)
if [ ! -f "/config/www/ICEcoder/index.php" ]; then
	curl -o /tmp/install.zip  -L \
		"https://github.com/icecoder/ICEcoder/archive/${ICECODER_VERSION}.zip"
	cd /tmp || exit
	unzip -qq install.zip
	mv ICEcoder-*/data/.gitkeep /data/
	mv ICEcoder-*/plugins/index.php /plugins/
	mv ICEcoder-* /app/ICEcoder
	cd / || exit
	rm -rf /tmp/* /config/www/data
	rm -rf /app/ICEcoder/data
	rm -rf /app/ICEcoder/plugins
	chown -R abc:abc \
		/app/ICEcoder \
		/data \
		/config \
		/plugins
fi