Correct Variable expansion

This commit is contained in:
Alexandre
2024-08-21 16:16:38 +02:00
committed by GitHub
parent 6fa4ba34e0
commit fda4764a02

View File

@@ -13,17 +13,15 @@ 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' )" ]; if [ -z "$(ls -A "$OLD_CONFIG_LOCATION")" ]; then
then
# Empty # Empty
rmdir "$OLD_CONFIG_LOCATION" rmdir "$OLD_CONFIG_LOCATION"
else else
# Not Empty # Not Empty
bashio::log.info "Moving old configuration settings from $OLD_CONFIG_LOCATION to $CONFIG_LOCATION" bashio::log.info "Moving old configuration settings from $OLD_CONFIG_LOCATION to $CONFIG_LOCATION"
cp -rnT "$OLD_CONFIG_LOCATION" "$CONFIG_LOCATION"/ cp -rnT "$OLD_CONFIG_LOCATION" "$CONFIG_LOCATION/"
rm -r "$OLD_CONFIG_LOCATION" rm -r "$OLD_CONFIG_LOCATION"
fi fi
fi fi