mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 13:54:05 +02:00
Clean data folder
This commit is contained in:
@@ -11,6 +11,11 @@ if bashio::config.true "dry_run"; then
|
|||||||
bashio::log.warning "Dry run mode : on"
|
bashio::log.warning "Dry run mode : on"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean previous data
|
||||||
|
mv /data/config.json /
|
||||||
|
rm -r /data/*
|
||||||
|
mv /config.json /data
|
||||||
|
|
||||||
bashio::log.info "Checking status of referenced repositoriess..."
|
bashio::log.info "Checking status of referenced repositoriess..."
|
||||||
VERBOSE=$(bashio::config 'verbose')
|
VERBOSE=$(bashio::config 'verbose')
|
||||||
|
|
||||||
@@ -43,8 +48,8 @@ if [ ! -d "/data/$BASENAME" ]; then
|
|||||||
else
|
else
|
||||||
LOGINFO="... updating ${REPOSITORY}" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
LOGINFO="... updating ${REPOSITORY}" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
||||||
cd "/data/$BASENAME" || exit
|
cd "/data/$BASENAME" || exit
|
||||||
git pull --rebase origin/master >/dev/null || git reset --hard origin/master >/dev/null
|
git pull --rebase >/dev/null || git reset --hard >/dev/null
|
||||||
git pull --rebase origin/master >/dev/null
|
git pull --rebase >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LOGINFO="... parse addons" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
LOGINFO="... parse addons" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
||||||
|
|||||||
Reference in New Issue
Block a user