From f2fade3071bf27bb89250a1044b811fafb7d4815 Mon Sep 17 00:00:00 2001 From: nagumii Date: Sat, 11 Jan 2025 21:03:28 +0200 Subject: [PATCH] change from term=screen to xterm-256color --- .../out/rootfs_uclibc_rv1106/home/femto/.bashrc | 6 +++--- .../usr/local/bin/femto-config | 2 +- .../usr/local/bin/femto-software.sh | 15 +++++++-------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/home/femto/.bashrc b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/home/femto/.bashrc index e5bd70d..e036d96 100644 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/home/femto/.bashrc +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/home/femto/.bashrc @@ -1,9 +1,6 @@ # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples -export NCURSES_NO_UTF8_ACS=1 -export TERM="xterm-256color" -export LANG="C.UTF-8" # If not running interactively, don't do anything case $- in *i*) ;; @@ -117,3 +114,6 @@ if ! shopt -oq posix; then . /etc/bash_completion fi fi +export NCURSES_NO_UTF8_ACS=1 +export TERM=xterm-256color +export LANG=C.UTF-8 diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config index 26b383d..3819dbd 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config @@ -1,7 +1,7 @@ #!/bin/bash # prevents weirdness over tty export NCURSES_NO_UTF8_ACS=1 -export TERM=screen +export TERM=xterm-256color export LANG=C.UTF-8 if [[ $EUID -ne 0 ]]; then diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh index 46628db..69490e5 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh @@ -1,7 +1,4 @@ #!/bin/bash -export NCURSES_NO_UTF8_ACS=1 -export TERM=screen -export LANG=C.UTF-8 title="Software Manager" package_dir="/usr/local/bin/packages" @@ -14,12 +11,13 @@ install() { echo "Installing $($package_dir/$1.sh -N)..." # Run the installation script, capturing the output and displaying it in real time output=$(eval "$package_dir/$1.sh -i 2>&1 | tee /dev/tty") + echo $output install_status=$? # Capture the exit status of the eval command user_message=$(echo "$output" | awk '/user_message: / {found=1; split($0, arr, "user_message: "); print arr[2]; next} found {print}' | sed '/^$/q') # grab the user_message, if present - output=$(echo "$output" | sed '/user_message: /,$d') # remove the user message from the detailed output + #output=$(echo -e "$output" | sed '/user_message: /,$d') # remove the user message from the detailed output if [ $install_status -eq 0 ]; then # if the installation was successful - dialog --colors --title "$title" --beep --msgbox "\n\ZuInstallation of $($package_dir/$1.sh -N) successful!\Zn$([ -n "$user_message" ] && echo "\n\n$user_message")\n\nLog:\n$(echo -e $output)" 0 0 # if there's a user_message, display it with two preceeding line breaks + dialog --colors --title "$title" --beep --msgbox "\n\ZuInstallation of $($package_dir/$1.sh -N) successful!\Zn$([ -n "$user_message" ] && echo "\n\n$user_message")\n\nLog:\n$(echo $output)" 0 0 # if there's a user_message, display it with two preceeding line breaks else dialog --colors --title "$title" --beep --msgbox "\n\ZuInstallation of $($package_dir/$1.sh -N) FAILED!\Zn\n\n$user_message\n\nLog:\n$(echo -e $output)" 0 0 # if there's a user_message, display it with two preceeding line breaks fi @@ -34,11 +32,11 @@ uninstall() { output=$(eval "$package_dir/$1.sh -u 2>&1 | tee /dev/tty") install_status=$? # Capture the exit status of the eval command user_message=$(echo "$output" | awk '/user_message: / {found=1; split($0, arr, "user_message: "); print arr[2]; next} found {print}' | sed '/^$/q') # grab the user_message, if present - output=$(echo "$output" | sed '/user_message: /,$d') # remove the user message from the detailed output + #output=$(echo "$output" | sed '/user_message: /,$d') # remove the user message from the detailed output if [ $install_status -eq 0 ]; then # if the installation was successful - dialog --colors --title "$title" --beep --msgbox "\n\ZuUninstallation of $($package_dir/$1.sh -N) successful!\Zn$([ -n "$user_message" ] && echo "\n\n$user_message")\n\nLog:\n$output" 0 0 # if there's a user_message, display it with two preceeding line breaks + dialog --colors --title "$title" --beep --msgbox "\n\ZuUninstallation of $($package_dir/$1.sh -N) successful!\Zn$([ -n "$user_message" ] && echo "\n\n$user_message")\n\nLog:\n$(echo -e "$output")" 0 0 # if there's a user_message, display it with two preceeding line breaks else - dialog --colors --title "$title" --beep --msgbox "\n\ZuUninstallation of $($package_dir/$1.sh -N) FAILED!\Zn\n\n$user_message\n\nLog:\n$output" 0 0 # if there's a user_message, display it with two preceeding line breaks + dialog --colors --title "$title" --beep --msgbox "\n\ZuUninstallation of $($package_dir/$1.sh -N) FAILED!\Zn\n\n$user_message\n\nLog:\n$(echo "$output")" 0 0 # if there's a user_message, display it with two preceeding line breaks fi } @@ -146,5 +144,6 @@ exit 0 # 4 "Mosquitto MQTT broker" \ # 5 "GPS and Telemetry" \ + # 4) mosquitto ;; # 5) gpsd ;; \ No newline at end of file