From 39acb510bb8d5a30cb83b0e40ebc9d8d9f689750 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 18 Oct 2021 17:00:48 +0200 Subject: [PATCH] convert LF --- addons_updater/README.md | 2 +- addons_updater/build.json | 4 +- addons_updater/config.json | 64 +++++++++-------- addons_updater/run.sh | 68 +++++++++---------- bazarr/CHANGELOG.md | 10 ++- bazarr/Dockerfile | 20 +++--- bazarr/config.json | 25 ++----- papermerge/Dockerfile | 10 +-- .../rootfs/etc/cont-init.d/00-aaa_bashio | 15 ++-- 9 files changed, 109 insertions(+), 109 deletions(-) diff --git a/addons_updater/README.md b/addons_updater/README.md index fe00b4b2d..a9bb27e0b 100644 --- a/addons_updater/README.md +++ b/addons_updater/README.md @@ -1,4 +1,5 @@ # Home assistant add-on: addons updater + ![Supports aarch64 Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armhf Architecture][armhf-shield] ![Supports armv7 Architecture][armv7-shield] ## About @@ -34,7 +35,6 @@ gituser: your github email gitpass: add your github password here, or a specific key if you have two factor identification enabled ``` - [repository]: https://github.com/alexbelgium/hassio-addons [aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg [amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg diff --git a/addons_updater/build.json b/addons_updater/build.json index 5e7e47c86..8a48c0177 100644 --- a/addons_updater/build.json +++ b/addons_updater/build.json @@ -1,8 +1,8 @@ { - "build_from": { + "build_from": { "aarch64": "homeassistant/aarch64-base-python:3.9-alpine3.13", "armhf": "homeassistant/armhf-base-python:3.9-alpine3.13", "armv7": "homeassistant/armv7-base-python:3.9-alpine3.13", "amd64": "homeassistant/amd64-base-python:3.9-alpine3.13" - } + } } diff --git a/addons_updater/config.json b/addons_updater/config.json index f3c306333..439d0c3c1 100644 --- a/addons_updater/config.json +++ b/addons_updater/config.json @@ -1,35 +1,45 @@ { - "name": "Addons_Updater", - "version": "3.2", - "slug": "updater", - "description": "Automatic addons update by aligning version tag with upstream releases", - "url": "https://github.com/alexbelgium/hassio-addons", - "arch": [ - "aarch64", - "amd64", - "armv7", - "armhf" - ], - "ports": { - }, - "ports_description": { - }, + "name": "Addons_Updater", + "version": "3.2", + "slug": "updater", + "description": "Automatic addons update by aligning version tag with upstream releases", + "url": "https://github.com/alexbelgium/hassio-addons", + "arch": ["aarch64", "amd64", "armv7", "armhf"], + "ports": {}, + "ports_description": {}, "startup": "once", "boot": "manual", - "environment": { "GIT_DISCOVERY_ACROSS_FILESYSTEM": "1" }, + "environment": { "GIT_DISCOVERY_ACROSS_FILESYSTEM": "1" }, "options": { - "addon": [{ "slug": "addon slug", "beta": false, "fulltag": false, "repository": "https://github.com/user/repo", "upstream": "github_user/repo_name" }], - "gituser": "gituser", - "gitpass": "gitpassword", - "gitmail": "youremail@gmail.com", - "verbose": true + "addon": [ + { + "slug": "addon slug", + "beta": false, + "fulltag": false, + "repository": "https://github.com/user/repo", + "upstream": "github_user/repo_name" + } + ], + "gituser": "gituser", + "gitpass": "gitpassword", + "gitmail": "youremail@gmail.com", + "verbose": true }, "schema": { - "addon": [{ "slug": "str", "beta": "bool", "fulltag": "bool", "having_asset": "bool?", "repository": "str", "upstream": "str"}], - "gituser": "str", - "gitpass": "str", - "gitmail": "str", - "gitapi": "str?", - "verbose": "bool" + "addon": [ + { + "slug": "str", + "beta": "bool", + "fulltag": "bool", + "having_asset": "bool?", + "repository": "str", + "upstream": "str" + } + ], + "gituser": "str", + "gitpass": "str", + "gitmail": "str", + "gitapi": "str?", + "verbose": "bool" } } diff --git a/addons_updater/run.sh b/addons_updater/run.sh index d68ccce22..9f65fcfe2 100644 --- a/addons_updater/run.sh +++ b/addons_updater/run.sh @@ -5,36 +5,36 @@ ########## if bashio::supervisor.ping; then - bashio::log.blue \ - '-----------------------------------------------------------' - bashio::log.blue " Add-on: $(bashio::addon.name)" - bashio::log.blue " $(bashio::addon.description)" - bashio::log.blue \ - '-----------------------------------------------------------' + bashio::log.blue \ + '-----------------------------------------------------------' + bashio::log.blue " Add-on: $(bashio::addon.name)" + bashio::log.blue " $(bashio::addon.description)" + bashio::log.blue \ + '-----------------------------------------------------------' - bashio::log.blue " Add-on version: $(bashio::addon.version)" - if bashio::var.true "$(bashio::addon.update_available)"; then - bashio::log.magenta ' There is an update available for this add-on!' - bashio::log.magenta \ - " Latest add-on version: $(bashio::addon.version_latest)" - bashio::log.magenta ' Please consider upgrading as soon as possible.' - else - bashio::log.green ' You are running the latest version of this add-on.' - fi + bashio::log.blue " Add-on version: $(bashio::addon.version)" + if bashio::var.true "$(bashio::addon.update_available)"; then + bashio::log.magenta ' There is an update available for this add-on!' + bashio::log.magenta \ + " Latest add-on version: $(bashio::addon.version_latest)" + bashio::log.magenta ' Please consider upgrading as soon as possible.' + else + bashio::log.green ' You are running the latest version of this add-on.' + fi - bashio::log.blue " System: $(bashio::info.operating_system)" \ - " ($(bashio::info.arch) / $(bashio::info.machine))" - bashio::log.blue " Home Assistant Core: $(bashio::info.homeassistant)" - bashio::log.blue " Home Assistant Supervisor: $(bashio::info.supervisor)" + bashio::log.blue " System: $(bashio::info.operating_system)" \ + " ($(bashio::info.arch) / $(bashio::info.machine))" + bashio::log.blue " Home Assistant Core: $(bashio::info.homeassistant)" + bashio::log.blue " Home Assistant Supervisor: $(bashio::info.supervisor)" - bashio::log.blue \ - '-----------------------------------------------------------' - bashio::log.blue \ - ' Please, share the above information when looking for help' - bashio::log.blue \ - ' or support in, e.g., GitHub, forums or the Discord chat.' - bashio::log.blue \ - '-----------------------------------------------------------' + bashio::log.blue \ + '-----------------------------------------------------------' + bashio::log.blue \ + ' Please, share the above information when looking for help' + bashio::log.blue \ + ' or support in, e.g., GitHub, forums or the Discord chat.' + bashio::log.blue \ + '-----------------------------------------------------------' fi ########## @@ -84,7 +84,8 @@ for addons in $(bashio::config "addon|keys"); do else LOGINFO="... $SLUG : updating ${REPOSITORY}" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi cd "/data/$BASENAME" - git pull --rebase &>/dev/null || git reset --hard &>/dev/null; git pull --rebase &>/dev/null + git pull --rebase &>/dev/null || git reset --hard &>/dev/null + git pull --rebase &>/dev/null fi #Define the folder addon @@ -119,7 +120,7 @@ for addons in $(bashio::config "addon|keys"); do LASTVERSION=$(lastversion --pre "https://github.com/$UPSTREAM" $FULLTAG $HAVINGASSET) else LOGINFO="... $SLUG : beta is off" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi - LASTVERSION=$(lastversion "https://github.com/$UPSTREAM" $FULLTAG $HAVINGASSET) + LASTVERSION=$(lastversion "https://github.com/$UPSTREAM" $FULLTAG $HAVINGASSET) fi # Add brackets @@ -136,12 +137,12 @@ for addons in $(bashio::config "addon|keys"); do #Change all instances of version LOGINFO="... $SLUG : updating files" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi sed -i "s/${CURRENT}/${LASTVERSION}/g" /data/${BASENAME}/${SLUG}/config.json - sed -i "s/${CURRENT}/${LASTVERSION}/g" /data/${BASENAME}/${SLUG}/Dockerfile || true #Allow absence of Dockerfile + sed -i "s/${CURRENT}/${LASTVERSION}/g" /data/${BASENAME}/${SLUG}/Dockerfile || true #Allow absence of Dockerfile [ -f "/data/${BASENAME}/${SLUG}/build.json" ] && sed -i "s/${CURRENT}/${LASTVERSION}/g" /data/${BASENAME}/${SLUG}/build.json || true #Allow absence of build.json # Remove " and modify version - LASTVERSION=${LASTVERSION//\"} - CURRENT=${CURRENT//\"} + LASTVERSION=${LASTVERSION//\"/} + CURRENT=${CURRENT//\"/} jq --arg variable $LASTVERSION '.version = $variable' /data/${BASENAME}/${SLUG}/config.json | sponge /data/${BASENAME}/${SLUG}/config.json # Replace version tag #Update changelog @@ -151,7 +152,7 @@ for addons in $(bashio::config "addon|keys"); do sed -i "1i " /data/${BASENAME}/${SLUG}/CHANGELOG.md LOGINFO="... $SLUG : files updated" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi - #Git commit and push + #Git commit and push git add -A # add all modified files git commit -m "Update to ${LASTVERSION}" >/dev/null @@ -169,4 +170,3 @@ for addons in $(bashio::config "addon|keys"); do done bashio::log.info "Addons update completed" - diff --git a/bazarr/CHANGELOG.md b/bazarr/CHANGELOG.md index d5c1aba6c..c0f55144b 100644 --- a/bazarr/CHANGELOG.md +++ b/bazarr/CHANGELOG.md @@ -1,28 +1,36 @@ - ## 1.0.0 (13-10-2021) + - Update to latest version from linuxserver/docker-bazarr ## 0.9.9 (11-09-2021) + - Update to latest version from linuxserver/docker-bazarr ## 0.9.8 (02-09-2021) + - Update to latest version from linuxserver/docker-bazarr ## 0.9.7 (14-08-2021) + - Update to latest version from linuxserver/docker-bazarr ## 0.9.6 (07-08-2021) + - Update to latest version from linuxserver/docker-bazarr ## 2.6.2 (07-08-2021) + - Update to latest version from alexbelgium/portainer ## 0.9.6 (21-07-2021) + - Update to latest version from linuxserver/docker-bazarr - Enable smb mounts ## 0.9.5 (09-05-2021) + - Update to latest version from linuxserver/docker-bazarr + ## 3.0.2.4552 - Update to latest version from linuxserver/docker-bazarr diff --git a/bazarr/Dockerfile b/bazarr/Dockerfile index fe1a360dd..9fd33b7fc 100644 --- a/bazarr/Dockerfile +++ b/bazarr/Dockerfile @@ -10,17 +10,17 @@ RUN \ apt-get clean \ && apt-get update \ && apt-get install -y \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ + jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ || apk add --no-cache \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ + jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ \ ################## # Install bashio # diff --git a/bazarr/config.json b/bazarr/config.json index 8eaf2904d..6aec784b9 100644 --- a/bazarr/config.json +++ b/bazarr/config.json @@ -1,15 +1,6 @@ { - "arch": [ - "aarch64", - "amd64", - "armv7", - "armhf" - ], - "backup_exclude": [ - "**/Backups/*", - "**/logs/*", - "**/MediaCover/*" - ], + "arch": ["aarch64", "amd64", "armv7", "armhf"], + "backup_exclude": ["**/Backups/*", "**/logs/*", "**/MediaCover/*"], "boot": "auto", "description": "Companion application to Sonarr and Radarr to download subtitles", "devices": [ @@ -32,12 +23,7 @@ "PUID": "0", "PGID": "0" }, - "map": [ - "config:rw", - "share:rw", - "media:rw", - "ssl" - ], + "map": ["config:rw", "share:rw", "media:rw", "ssl"], "name": "Bazarr NAS", "options": { "PUID": 0, @@ -49,10 +35,7 @@ "ports_description": { "6767/tcp": "web interface" }, - "privileged": [ - "SYS_ADMIN", - "DAC_READ_SEARCH" - ], + "privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"], "schema": { "PUID": "int", "PGID": "int", diff --git a/papermerge/Dockerfile b/papermerge/Dockerfile index 6f7392bf6..7504acf3e 100644 --- a/papermerge/Dockerfile +++ b/papermerge/Dockerfile @@ -12,11 +12,11 @@ RUN \ apt-get clean \ && apt-get update \ && apt-get install -y --no-install-recommends \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ + jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ \ ################### # Install bashio # diff --git a/papermerge/rootfs/etc/cont-init.d/00-aaa_bashio b/papermerge/rootfs/etc/cont-init.d/00-aaa_bashio index b44185d70..96f93a89e 100644 --- a/papermerge/rootfs/etc/cont-init.d/00-aaa_bashio +++ b/papermerge/rootfs/etc/cont-init.d/00-aaa_bashio @@ -1,14 +1,13 @@ #!/bin/bash - -if [ ! -f "/usr/lib/bashio" ]; then +if [ ! -f "/usr/bin/bashio" ]; then echo "Bashio does not exist, executing script" ################ # Install apps # ################ apt-get clean - apt-get update \ - apt-get install -y --no-install-recommends \ + apt-get update + apt-get install -y --no-install-recommends \ jq \ curl \ cifs-utils \ @@ -20,10 +19,10 @@ if [ ! -f "/usr/lib/bashio" ]; then ################## mkdir -p /tmp/bashio curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | - tar -xzf - --strip 1 -C /tmp/bashio \ - mv /tmp/bashio/lib /usr/lib/bashio \ - ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - rm -rf /tmp/bashio + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio echo "Bashio installed" fi