diff --git a/docker-mods/swag/root/etc/cont-init.d/98-themepark b/docker-mods/swag/root/etc/cont-init.d/98-themepark index 8f2e5733..5738bca5 100644 --- a/docker-mods/swag/root/etc/cont-init.d/98-themepark +++ b/docker-mods/swag/root/etc/cont-init.d/98-themepark @@ -4,19 +4,6 @@ echo '-------------------------' echo '| SWAG theme.park Mod |' echo '-------------------------' -if ! [[ -x "$(command -v svn)" ]]; then -echo '--------------------------' -echo '| Installing svn package |' -echo '--------------------------' - if [ -x "$(command -v apk)" ]; then - apk update && \ - apk add --no-cache subversion - elif [ -x "$(command -v apt-get)" ]; then - apt-get update && \ - apt-get install -y subversion - fi -fi - # Display variables for troubleshooting echo -e "Variables set:\\n\ 'TP_BRANCH'=${TP_BRANCH}\\n" @@ -41,7 +28,7 @@ fi mkdir -p /config/www/themepark -SHA_RELEASE=$(curl -sL "https://api.github.com/repos/gilbn/theme.park/commits/${TP_BRANCH}" | jq -r '.sha'); +SHA_RELEASE=$(curl -sL "https://api.github.com/repos/themepark-dev/theme.park/commits/${TP_BRANCH}" | jq -r '.sha'); if [[ ! -f "/config/www/themepark/sha.txt" ]]; then SHA="" else @@ -50,13 +37,21 @@ fi # Downloading fresh webui files from source. if [[ $SHA != $SHA_RELEASE ]]; then echo "-----------------------------------------------------" - echo "| Downloading latest files from ${TP_BRANCH} branch |" + echo "| Cloning latest files from ${TP_BRANCH} branch |" + echo "-----------------------------------------------------" + rm -rf /tmp/themepark + git clone --depth 1 --quiet --branch ${TP_BRANCH} https://github.com/themepark-dev/theme.park.git /tmp/themepark + echo "-----------------------------------------------------" + echo "| Copying files to /config/www/themepark |" + echo "-----------------------------------------------------" + cp -a /tmp/themepark/css /config/www/themepark/css + cp -a /tmp/themepark/resources /config/www/themepark/resources + cp -a /tmp/themepark/themes.json /config/www/themepark + cp -a /tmp/themepark/index.html /config/www/themepark + rm -rf /tmp/themepark + echo "-----------------------------------------------------" + echo '| Clone and copy finished |' echo "-----------------------------------------------------" - svn export --quiet --force "https://github.com/GilbN/theme.park/branches/${TP_BRANCH}/css" /config/www/themepark/css - svn export --quiet --force "https://github.com/GilbN/theme.park/branches/${TP_BRANCH}/resources" /config/www/themepark/resources - svn export --quiet --force "https://github.com/GilbN/theme.park/branches/${TP_BRANCH}/themes.json" /config/www/themepark - svn export --quiet --force "https://github.com/GilbN/theme.park/branches/${TP_BRANCH}/index.html" /config/www/themepark - printf '\nDownload finished\n\n' fi cat <<< "$SHA_RELEASE" > "/config/www/themepark/sha.txt" diff --git a/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark-add-package/run b/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark-add-package/run deleted file mode 100755 index a37649f8..00000000 --- a/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark-add-package/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/with-contenv bash - -if ! [[ -x "$(command -v svn)" ]]; then - echo "subversion" >> /mod-repo-packages-to-install.list -fi diff --git a/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark-add-package/type b/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark-add-package/type deleted file mode 100644 index 3d92b15f..00000000 --- a/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark-add-package/type +++ /dev/null @@ -1 +0,0 @@ -oneshot \ No newline at end of file diff --git a/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark-add-package/up b/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark-add-package/up deleted file mode 100644 index 12d7a60e..00000000 --- a/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark-add-package/up +++ /dev/null @@ -1 +0,0 @@ -/etc/s6-overlay/s6-rc.d/init-mod-themepark-add-package/run \ No newline at end of file diff --git a/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark-add-package/dependencies.d/init-mods b/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/dependencies.d/init-mods similarity index 100% rename from docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark-add-package/dependencies.d/init-mods rename to docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/dependencies.d/init-mods diff --git a/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/dependencies.d/init-mods-package-install b/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/dependencies.d/init-mods-package-install deleted file mode 100644 index e69de29b..00000000 diff --git a/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run b/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run index b2162488..5738bca5 100755 --- a/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run +++ b/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mod-themepark/run @@ -28,7 +28,7 @@ fi mkdir -p /config/www/themepark -SHA_RELEASE=$(curl -sL "https://api.github.com/repos/gilbn/theme.park/commits/${TP_BRANCH}" | jq -r '.sha'); +SHA_RELEASE=$(curl -sL "https://api.github.com/repos/themepark-dev/theme.park/commits/${TP_BRANCH}" | jq -r '.sha'); if [[ ! -f "/config/www/themepark/sha.txt" ]]; then SHA="" else @@ -37,13 +37,21 @@ fi # Downloading fresh webui files from source. if [[ $SHA != $SHA_RELEASE ]]; then echo "-----------------------------------------------------" - echo "| Downloading latest files from ${TP_BRANCH} branch |" + echo "| Cloning latest files from ${TP_BRANCH} branch |" + echo "-----------------------------------------------------" + rm -rf /tmp/themepark + git clone --depth 1 --quiet --branch ${TP_BRANCH} https://github.com/themepark-dev/theme.park.git /tmp/themepark + echo "-----------------------------------------------------" + echo "| Copying files to /config/www/themepark |" + echo "-----------------------------------------------------" + cp -a /tmp/themepark/css /config/www/themepark/css + cp -a /tmp/themepark/resources /config/www/themepark/resources + cp -a /tmp/themepark/themes.json /config/www/themepark + cp -a /tmp/themepark/index.html /config/www/themepark + rm -rf /tmp/themepark + echo "-----------------------------------------------------" + echo '| Clone and copy finished |' echo "-----------------------------------------------------" - svn export --quiet --force "https://github.com/GilbN/theme.park/branches/${TP_BRANCH}/css" /config/www/themepark/css - svn export --quiet --force "https://github.com/GilbN/theme.park/branches/${TP_BRANCH}/resources" /config/www/themepark/resources - svn export --quiet --force "https://github.com/GilbN/theme.park/branches/${TP_BRANCH}/themes.json" /config/www/themepark - svn export --quiet --force "https://github.com/GilbN/theme.park/branches/${TP_BRANCH}/index.html" /config/www/themepark - printf '\nDownload finished\n\n' fi cat <<< "$SHA_RELEASE" > "/config/www/themepark/sha.txt" diff --git a/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mods-package-install/dependencies.d/init-mod-themepark-add-package b/docker-mods/swag/root/etc/s6-overlay/s6-rc.d/init-mods-package-install/dependencies.d/init-mod-themepark-add-package deleted file mode 100644 index e69de29b..00000000