mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-30 19:26:07 +02:00
Update automatic_packages.sh
This commit is contained in:
@@ -81,13 +81,9 @@ for files in "/scripts" "/etc/cont-init.d"; do
|
|||||||
[ $PACKMANAGER = "apt" ] && PACKAGES="$PACKAGES sqlite3"
|
[ $PACKMANAGER = "apt" ] && PACKAGES="$PACKAGES sqlite3"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(grep -rnw "$files/" -e 'lastversion') ]]; then
|
if [[ $(grep -rnw "$files/" -e 'pip') ]] && [[ ! $(pip -V) ]]; then
|
||||||
[ $PACKMANAGER = "apk" ] && [[ $(pip -V) ]] \
|
[ $PACKMANAGER = "apk" ] && PACKAGES="$PACKAGES py3-pip"
|
||||||
|| apk add --no-cache py3-pip \
|
[ $PACKMANAGER = "apt" ] && PACKAGES="$PACKAGES python-pip"
|
||||||
&& pip install lastversion
|
|
||||||
[ $PACKMANAGER = "apt" ] && [[ $(pip -V) ]] \
|
|
||||||
|| apt-get install -y python-pip \
|
|
||||||
&& pip install lastversion
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
@@ -106,12 +102,29 @@ if [ -d /etc/nginx2 ]; then
|
|||||||
touch /var/log/nginx/error.log
|
touch /var/log/nginx/error.log
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##################
|
#######################
|
||||||
# INSTALL BASHIO #
|
# INSTALL MANUAL APPS #
|
||||||
##################
|
#######################
|
||||||
|
|
||||||
|
for files in "/scripts" "/etc/cont-init.d"; do
|
||||||
|
|
||||||
|
# Bashio
|
||||||
|
if [[ $(grep -rnw "$files/" -e 'bashio') ]]; then
|
||||||
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
|
||||||
mv /tmp/bashio/lib /usr/lib/bashio
|
mv /tmp/bashio/lib /usr/lib/bashio
|
||||||
ln -s /usr/lib/bashio/bashio /usr/bin/bashio
|
ln -s /usr/lib/bashio/bashio /usr/bin/bashio
|
||||||
rm -rf /tmp/bashio
|
rm -rf /tmp/bashio
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Lastversion
|
||||||
|
if [[ $(grep -rnw "$files/" -e 'lastversion') ]]; then
|
||||||
|
[ $PACKMANAGER = "apk" ] && [[ $(pip -V) ]] \
|
||||||
|
|| apk add --no-cache py3-pip \
|
||||||
|
&& pip install lastversion
|
||||||
|
[ $PACKMANAGER = "apt" ] && [[ $(pip -V) ]] \
|
||||||
|
|| apt-get install -y python-pip \
|
||||||
|
&& pip install lastversion
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user