Housekeeping

- Update README
- Run shellcheck on .sh files
- Add helper scripts
- Remove eirene vm variant
- Add post-install checklist

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-08-23 01:22:08 +02:00
parent a048be5c51
commit 78a862bd2e
29 changed files with 582 additions and 434 deletions

View File

@@ -1,19 +1,19 @@
echo "Starting impermanence mount with source: $source, target: $target, path: $path."
echo "Starting impermanence mount with source: ${source}, target: ${target}, path: ${path}."
source_current="$source"
target_current="$target"
source_current="${source}"
target_current="${target}"
IFS='/' read -ra path_parts <<< "$path"
IFS='/' read -ra path_parts <<< "${path}"
unset "path_parts[-1]"
for part in "${path_parts[@]}"; do
source_current="$source_current/$part"
target_current="$target_current/$part"
source_current="${source_current}/${part}"
target_current="${target_current}/${part}"
if [ ! -d "$source_current" ]; then
if [[ ! -d "${source_current}" ]]; then
break
fi
read -r mode owner group <<< "$(stat -c '%a %u %g' "$source_current")"
install -d -m "$mode" -o "$owner" -g "$group" "$target_current"
read -r mode owner group <<< "$(stat -c '%a %u %g' "${source_current}")"
install -d -m "${mode}" -o "${owner}" -g "${group}" "${target_current}"
done