mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-31 02:10:32 +02:00
Update automatic_packages.sh
This commit is contained in:
@@ -1,13 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set +u 2>/dev/null
|
|
||||||
|
|
||||||
|
########
|
||||||
|
# INIT #
|
||||||
|
########
|
||||||
|
|
||||||
|
PACKAGES="${PACKAGES:-}"
|
||||||
|
set +u 2>/dev/null
|
||||||
VERBOSE=true
|
VERBOSE=true
|
||||||
|
|
||||||
##################
|
################################
|
||||||
# INIT VARIABLES #
|
# CHECK WHICH STRATEGY IS USED #
|
||||||
##################
|
################################
|
||||||
|
|
||||||
PACKMANAGER="apk"
|
if ls /etc/cont-init.d 1> /dev/null 2>&1; then SCRIPTSTRATEGY="/etc/cont-init.d"; fi
|
||||||
|
if ls /scripts 1> /dev/null 2>&1; then SCRIPTSTRATEGY="/scripts"; fi
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# CHECK WHICH BASE IS USED #
|
# CHECK WHICH BASE IS USED #
|
||||||
@@ -48,7 +54,7 @@ if ls /etc/nginx 1> /dev/null 2>&1; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Scripts
|
# Scripts
|
||||||
for files in "/scripts" "/etc/cont-init.d"; do
|
for files in "$SCRIPTSTRATEGY"; do
|
||||||
|
|
||||||
if ls $files/*smb* 1> /dev/null 2>&1; then
|
if ls $files/*smb* 1> /dev/null 2>&1; then
|
||||||
[ $VERBOSE = true ] && echo "smb found"
|
[ $VERBOSE = true ] && echo "smb found"
|
||||||
@@ -123,7 +129,7 @@ fi
|
|||||||
for files in "/scripts" "/etc/cont-init.d"; do
|
for files in "/scripts" "/etc/cont-init.d"; do
|
||||||
|
|
||||||
# Bashio
|
# Bashio
|
||||||
if [[ $(grep -rnw "$files/" -e 'bashio') ]]; then
|
if [[ $(grep -rnw "$files/" -e 'bashio') ]] && [ ! -f "/usr/bin/bashio" ]; then
|
||||||
[ $VERBOSE = true ] && echo "install bashio"
|
[ $VERBOSE = true ] && echo "install bashio"
|
||||||
mkdir -p /tmp/bashio
|
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
|
curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | tar -xzf - --strip 1 -C /tmp/bashio
|
||||||
@@ -133,13 +139,13 @@ for files in "/scripts" "/etc/cont-init.d"; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Lastversion
|
# Lastversion
|
||||||
if [[ $(grep -rnw "$files/" -e 'lastversion') ]]; then
|
if [[ $(grep -rnw "$files/" -e 'lastversion') ]] && [[ $(lastversion --version) ]]; then
|
||||||
[ $VERBOSE = true ] && echo "install lastversion"
|
[ $VERBOSE = true ] && echo "install lastversion"
|
||||||
pip install lastversion
|
pip install lastversion
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Tempio
|
# Tempio
|
||||||
if [[ $(grep -rnw "$files/" -e 'tempio') ]]; then
|
if [[ $(grep -rnw "$files/" -e 'tempio') ]] && [ ! -f "/usr/bin/tempio" ]; then
|
||||||
[ $VERBOSE = true ] && echo "install tempio"
|
[ $VERBOSE = true ] && echo "install tempio"
|
||||||
TEMPIO_VERSION="2021.09.0"
|
TEMPIO_VERSION="2021.09.0"
|
||||||
BUILD_ARCH="$(bashio::info.arch)"
|
BUILD_ARCH="$(bashio::info.arch)"
|
||||||
|
|||||||
Reference in New Issue
Block a user