diff options
| author | Lee <lvturner@me.com> | 2025-02-18 11:05:23 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-18 11:05:23 +0800 |
| commit | 02c61c0ad905aadb53233958cf58aac47e4c38eb (patch) | |
| tree | 544992f8f3ced28ab166017d9ee3c51304a791ff | |
| parent | 47f07056f809df217e10f3f6522e51f89a0c59bf (diff) | |
Update: Ubuntu/Debian check in copy.sh
Some systems may have dpkg installed despite not being Debian or Ubuntu based, can check ID and ID_LIKE in /etc/os-release instead - if /etc/os-release doesn't exist (i.e. *BSD) then can also be assumed not to be Debian based system
| -rwxr-xr-x | copy.sh | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -36,8 +36,8 @@ print_color() { printf "%b%s%b\n" "$1" "$2" "$CLEAR" } -# Check if dpkg is installed (use to check if Debian or Ubuntu or based distros) -if command -v dpkg &> /dev/null; then +# Check /etc/os-release to see if this is an Ubuntu or Debian based distro +if grep -q '^\(ID_LIKE\|ID\)=.*\(debian\|ubuntu\)' /etc/os-release &> /dev/null; then printf "\n%.0s" {1..1} print_color $WARNING " █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ @@ -851,4 +851,4 @@ printf "\n%.0s" {1..1} printf "${INFO} However, it is ${MAGENTA}HIGHLY SUGGESTED${RESET} to logout and re-login or better reboot to avoid any issues" printf "\n%.0s" {1..1} printf "${SKY_BLUE}Thank you${RESET} for using ${MAGENTA}KooL's Hyprland Configuration${RESET}... ${YELLOW}ENJOY!!!${RESET}" -printf "\n%.0s" {1..3}
\ No newline at end of file +printf "\n%.0s" {1..3} |
