Added draft for retroflag

This commit is contained in:
Kevin Veen-Birkenbach 2020-05-25 14:18:34 +02:00
parent 19bd0979b3
commit 0feab7bce3

View File

@ -325,7 +325,7 @@ copy_qemu
copy_resolve_conf copy_resolve_conf
question "Should the image password of the standart user \"$target_username\" be changed?(y/N)" && read -r change_password question "Should the password of the standart user \"$target_username\" be changed?(y/N)" && read -r change_password
if [ "$change_password" == "y" ] if [ "$change_password" == "y" ]
then then
info "Changing passwords on target system..." info "Changing passwords on target system..."
@ -362,12 +362,25 @@ fi
question "Should the system be updated?(y/N)" && read -r update_system question "Should the system be updated?(y/N)" && read -r update_system
if [ "$update_system" == "y" ] if [ "$update_system" == "y" ]
then then
info "Updating system..." && info "Updating system..."
( case "$os" in
echo "yes | pacman-key --init" "arch"|"manjaro")
echo "yes | pacman-key --populate archlinuxarm" (
echo "yes | pacman -Syyu" echo "yes | pacman-key --init"
) | chroot "$root_mount_path" /bin/bash || error echo "yes | pacman-key --populate archlinuxarm"
echo "yes | pacman -Syyu"
) | chroot "$root_mount_path" /bin/bash || error
;;
"moode"|"retropie")
(
echo "yes | apt update"
echo "yes | apt upgrade"
) | chroot "$root_mount_path" /bin/bash || error
;;
*)
warning "System update for operation system \"$os\" is not supported yet. Skipped."
;;
esac
fi fi
question "Should the system be encrypted?(y/N)" && read -r encrypt_system question "Should the system be encrypted?(y/N)" && read -r encrypt_system
@ -399,5 +412,27 @@ fi
# rsync -av "$origin_wifi_config_path" "$target_wifi_config_path" # rsync -av "$origin_wifi_config_path" "$target_wifi_config_path"
# fi # fi
info "Running system specific procedures..."
if [ "$os" = "retropie" ]
then
question "Should the roms be copied to the system?" && read -r copy_roms
if [ "$copy_roms" == "y" ]
then
target_roms_path="$target_user_home_folder_path""/RetroPie/roms/" &&
source_roms_path="$origin_user_home""Games/roms/" &&
info "Copy roms from $source_roms_path to $target_roms_path..."
cp -v "$source_roms_path" "$target_roms_path" &&
chown -vR 1000 "$target_roms_path" || error
fi
question "Should the RetroFlag specific procedures be executed?" && read -r setup_retroflag
if [ "$setup_retroflag" == "y" ]
then
info "Executing RetroFlag specific procedures..." &&
(
echo 'wget -O - "https://raw.githubusercontent.com/RetroFlag/retroflag-picase/master/install_gpi.sh" | bash'
) | chroot "$root_mount_path" /bin/bash || error
fi
fi
destructor destructor
success "Setup successfull :)" && exit 0 success "Setup successfull :)" && exit 0