diff --git a/sdata/lib/dist-determine.sh b/sdata/lib/dist-determine.sh index 46f9afdd8..78f548ac1 100644 --- a/sdata/lib/dist-determine.sh +++ b/sdata/lib/dist-determine.sh @@ -25,7 +25,9 @@ function print_os_group_id_unofficial(){ printf "The support for your distro is provided by the community.\n" printf "It is not officially supported by github:end-4/dots-hyprland .\n" printf "${STY_BOLD}" - printf "If you find out any problems about it, PR is welcomed if you are able to address it. Or, create a discussion about it, but please do not submit issue, because the developers do not use this distro, therefore they cannot help.${STY_RST}\n" + printf "If you find out any problems about it, PR is welcomed if you are able to address it.\n" + printf "Or, create a discussion about it, but please do not submit issue, \n" + printf "because the developers do not use this distro, therefore they cannot help.${STY_RST}\n" printf "${STY_PURPLE}" printf "Proceed only at your own risk.\n" printf "============\n\n" diff --git a/sdata/subcmd-install/1.deps-router.sh b/sdata/subcmd-install/1.deps-router.sh index 1287e4c6f..c21b6b959 100644 --- a/sdata/subcmd-install/1.deps-router.sh +++ b/sdata/subcmd-install/1.deps-router.sh @@ -64,26 +64,39 @@ elif [[ "$OS_GROUP_ID" =~ ^(arch|gentoo|fedora)$ ]]; then if [[ "${tmp_update_status}" =~ ^(OUTDATED|EMPTY_TARGET|EMPTY_SOURCE|FORCE_OUTDATED|WIP)$ ]]; then printf "${STY_RED}${STY_BOLD}===URGENT===${STY_RST}\n" printf "${STY_RED}" - printf "The community provided ./sdata/dist-${TARGET_ID}/ is outdated (status: ${tmp_update_status}),\n" + printf "Status code: ${tmp_update_status}\n" + printf "The community provided ./sdata/dist-${TARGET_ID}/ seems to be outdated,\n" printf "which means it probably does not reflect all latest changes of ./sdata/dist-arch/ .\n" + printf "In such case it may work unexpectedly.${STY_RST}\n" printf "\n" - printf "According to the actual changes, it may still works, but it can also work unexpectedly.\n" - printf "It's highly recommended to check the following links before continue:${STY_RST}\n" + printf "${STY_RED}It's highly recommended to check the following links before continue:${STY_RST}\n" printf "${STY_UNDERLINE}https://github.com/end-4/dots-hyprland/discussions/2140${STY_RST}\n" printf "${STY_UNDERLINE}https://github.com/end-4/dots-hyprland/commits/main/sdata/dist-arch${STY_RST}\n" printf "${STY_UNDERLINE}https://github.com/end-4/dots-hyprland/commits/main/sdata/dist-${TARGET_ID}${STY_RST}\n" printf "\n" - printf "${STY_PURPLE}${STY_INVERT}PR on ./sdata/dist-${TARGET_ID}/ to properly reflect the latest changes of ./sdata/dist-arch is welcomed.${STY_RST}\n" + printf "${STY_PURPLE}PR on ./sdata/dist-${TARGET_ID}/ to properly reflect the latest changes of ./sdata/dist-arch is welcomed.${STY_RST}\n" + printf "${STY_PURPLE}${STY_BOLD}Again, do not create any issue,${STY_RST}\n" + printf "${STY_PURPLE}But you can create a discussion under \"Extra Distros\" category: ${STY_RST}\n" + printf "${STY_PURPLE}${STY_UNDERLINE}https://github.com/end-4/dots-hyprland/discussions/new?category=extra-distros${STY_RST}\n" printf "\n" - if [ "$ask" = "false" ]; then - echo "Urgent problem encountered, aborting...";exit 1 - else - printf "${STY_RED}Still proceed?${STY_RST}\n" - read -p "[y/N]: " p - case "$p" in - [yY])sleep 0;; - *)echo "Aborting...";exit 1;; - esac + if [[ "${tmp_update_status}" = "OUTDATED" ]]; then + printf "${STY_RED}NOTE: The conclusion above is determined automatically by comparing latest Git commit time,\n" + printf "which is not always correct because some changes on \"dist-arch\" is not needed for \"dist-${TARGET_ID}\",\n" + printf "in such case you should just ignore it and continue.\n" + printf "${STY_RST}\n" + fi + printf "\n" + if ! [[ "$IGNORE_OUTDATE_CHECK" = "true" ]]; then + if [ "$ask" = "false" ]; then + printf "${STY_RED}Urgent problem encountered, aborting...${STY_RST}\n";exit 1 + else + printf "${STY_RED}Still proceed?${STY_RST}\n" + read -p "[y/N]: " p + case "$p" in + [yY])sleep 0;; + *)echo "Aborting...";exit 1;; + esac + fi fi fi fi diff --git a/sdata/subcmd-install/options.sh b/sdata/subcmd-install/options.sh index 992010cfb..727a3c13b 100644 --- a/sdata/subcmd-install/options.sh +++ b/sdata/subcmd-install/options.sh @@ -14,6 +14,7 @@ Options for install: --skip-alldeps Skip the whole process installing dependency --skip-allsetups Skip the whole process setting up permissions/services etc --skip-allfiles Skip the whole process copying configuration files + --ignore-outdate Ignore outdate checking for community supported \"dist-*\". -s, --skip-sysupdate Skip system package upgrade e.g. \"sudo pacman -Syu\" --skip-plasmaintg Skip installing plasma-browser-integration --skip-backup Skip backup conflicting files @@ -45,7 +46,7 @@ cleancache(){ # `man getopt` to see more para=$(getopt \ -o hfFk:cs \ - -l help,force,firstrun,fontset:,clean,skip-allgreeting,skip-alldeps,skip-allsetups,skip-allfiles,skip-sysupdate,skip-plasmaintg,skip-backup,skip-quickshell,skip-fish,skip-hyprland,skip-fontconfig,skip-miscconf,core,exp-files,via-nix \ + -l help,force,firstrun,fontset:,clean,skip-allgreeting,skip-alldeps,skip-allsetups,skip-allfiles,ignore-outdate,skip-sysupdate,skip-plasmaintg,skip-backup,skip-quickshell,skip-fish,skip-hyprland,skip-fontconfig,skip-miscconf,core,exp-files,via-nix \ -n "$0" -- "$@") [ $? != 0 ] && echo "$0: Error when getopt, please recheck parameters." && exit 1 ##################################################################################### @@ -76,6 +77,7 @@ while true ; do --skip-allsetups) SKIP_ALLSETUPS=true;shift;; --skip-allfiles) SKIP_ALLFILES=true;shift;; -s|--skip-sysupdate) SKIP_SYSUPDATE=true;shift;; + --ignore-outdate) IGNORE_OUTDATE_CHECK=true;shift;; --skip-plasmaintg) SKIP_PLASMAINTG=true;shift;; --skip-backup) SKIP_BACKUP=true;shift;; --skip-hyprland) SKIP_HYPRLAND=true;shift;;