Merge pull request #746 from icenine451/cooker-0.8.0b-icenine451

Cooker 0.8.0b icenine451
This commit is contained in:
icenine451 2024-03-28 14:51:24 -04:00 committed by GitHub
commit 18c6c5ed85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 7 deletions

View file

@ -283,7 +283,7 @@ dir_prep() {
rm -rf "$symlink.old" rm -rf "$symlink.old"
fi fi
log i "$symlink is now $real\n" log i "$symlink is now $real"
} }
check_bios_files() { check_bios_files() {

View file

@ -30,10 +30,6 @@ log() {
else else
logfile="$rd_logs_folder/retrodeck.log" logfile="$rd_logs_folder/retrodeck.log"
fi fi
if [[ ! -f "$logfile" ]]; then
touch "$logfile"
echo "$timestamp [WARN] \"$logfile\" not found, creating."
fi
# Check if the shell is sh (not bash or zsh) to avoid colorization # Check if the shell is sh (not bash or zsh) to avoid colorization
if [ "${SHELL##*/}" = "sh" ]; then if [ "${SHELL##*/}" = "sh" ]; then

View file

@ -22,11 +22,17 @@ prepare_component() {
if [[ ! $current_setting_name =~ (rdhome|sdcard) ]]; then # Ignore these locations if [[ ! $current_setting_name =~ (rdhome|sdcard) ]]; then # Ignore these locations
local current_setting_value=$(get_setting_value "$rd_conf" "$current_setting_name" "retrodeck" "paths") local current_setting_value=$(get_setting_value "$rd_conf" "$current_setting_name" "retrodeck" "paths")
declare -g "$current_setting_name=$rdhome/$(basename $current_setting_value)" declare -g "$current_setting_name=$rdhome/$(basename $current_setting_value)"
create_dir "$rdhome/$(basename $current_setting_value)" if [[ ! $current_setting_name == "logs_folder" ]]; then # Don't create a logs folder normally, we want to maintain the current files exactly to not lose early-install logs.
create_dir "$rdhome/$(basename $current_setting_value)"
else # Log folder-specific actions
mv "$rd_logs_folder" "$logs_folder" # Move existing logs folder from internal to userland
ln -sf "$logs_folder" "$rd_logs_folder" # Link userland logs folder back to statically-written location
log d "Logs folder moved to $logs_folder and linked back to $rd_logs_folder"
fi
fi fi
done < <(grep -v '^\s*$' $rd_conf | awk '/^\[paths\]/{f=1;next} /^\[/{f=0} f') done < <(grep -v '^\s*$' $rd_conf | awk '/^\[paths\]/{f=1;next} /^\[/{f=0} f')
create_dir "/var/config/retrodeck/godot" create_dir "/var/config/retrodeck/godot"
dir_prep "$logs_folder" "$rd_logs_folder"
fi fi
if [[ "$action" == "postmove" ]]; then # Update the paths of any folders that came with the retrodeck folder during a move if [[ "$action" == "postmove" ]]; then # Update the paths of any folders that came with the retrodeck folder during a move
while read -r config_line; do while read -r config_line; do