mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-03 22:34:11 +02:00
Correct Variable expansion
This commit is contained in:
@@ -13,19 +13,17 @@ ln -s "$CONFIG_LOCATION" /app/config
|
|||||||
chmod -R 755 "$CONFIG_LOCATION"
|
chmod -R 755 "$CONFIG_LOCATION"
|
||||||
|
|
||||||
#Move files that may be in misspelled directory
|
#Move files that may be in misspelled directory
|
||||||
if [ -d "$OLD_CONFIG_LOCATION" ];
|
if [ -d "$OLD_CONFIG_LOCATION" ]; then
|
||||||
then
|
# Directory Exists
|
||||||
#Directory Exists
|
if [ -z "$(ls -A "$OLD_CONFIG_LOCATION")" ]; then
|
||||||
if [ -z "$( ls -A '$OLD_CONFIG_LOCATION' )" ];
|
# Empty
|
||||||
then
|
rmdir "$OLD_CONFIG_LOCATION"
|
||||||
#Empty
|
else
|
||||||
rmdir "$OLD_CONFIG_LOCATION"
|
# Not Empty
|
||||||
else
|
bashio::log.info "Moving old configuration settings from $OLD_CONFIG_LOCATION to $CONFIG_LOCATION"
|
||||||
#Not Empty
|
cp -rnT "$OLD_CONFIG_LOCATION" "$CONFIG_LOCATION/"
|
||||||
bashio::log.info "Moving old configuration settings from $OLD_CONFIG_LOCATION to $CONFIG_LOCATION"
|
rm -r "$OLD_CONFIG_LOCATION"
|
||||||
cp -rnT "$OLD_CONFIG_LOCATION" "$CONFIG_LOCATION"/
|
fi
|
||||||
rm -r "$OLD_CONFIG_LOCATION"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create files
|
# Create files
|
||||||
|
|||||||
Reference in New Issue
Block a user