GoalTV 1 Posted October 27, 2020 Share Posted October 27, 2020 Hey, I noticed by deafult the build-in script don't support update check for Rasperrian I have updated the script simply create new script for linux call it update or how you want it. #!/bin/bash detect_os() { grep -qis "$*" /etc/issue || grep -qis "$*" /etc/centos-release } do_update() { echo "Detecting OS ... " detect_os "Raspbian GNU/Linux" && echo "Found Raspbian" && dpkg_update && return detect_os "Debian GNU/Linux" && echo "Found Debian" && dpkg_update && return detect_os "Ubuntu" && echo "Found Ubuntu" && dpkg_update && return detect_os "CentOS" && echo "Found CenOS" && yum_update && return detect_os "Red Hat" && echo "Found RedHat" && yum_update && return detect_os "Fedora" && echo "Found Fedora" && yum_update && return detect_os "SUSE" && echo "Found SuSE" && zypper_update && return } dpkg_update() { if [ -x "/usr/bin/apt-get" ]; then echo "Starting update ..." apt-get clean && apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y else echo "'apt-get' package manager not found" fi } yum_update() { if [ -x "/usr/bin/yum" ]; then echo "Starting update ..." yum update -y && yum upgrade -y else echo "'yum' package manager not found" fi } zypper_update() { if [ -x "/usr/bin/zypper" ]; then echo "Starting update ..." zypper --non-interactive update else echo "'zypper' package manager not found" fi } do_update gabe31415 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.