Compare commits
No commits in common. "58c689a05979722b563e004cfa696434d6f7fae1" and "8e0c8a88eb4a32d41bb5449f54d91eaf38fd8e06" have entirely different histories.
58c689a059
...
8e0c8a88eb
1 changed files with 8 additions and 11 deletions
19
cd.sh
19
cd.sh
|
@ -109,6 +109,7 @@ local text=""
|
|||
"
|
||||
done
|
||||
cd_write "${CD_DNS_FILE}" "${text}"
|
||||
cd_cat "${CD_DNS_FILE}"
|
||||
}
|
||||
|
||||
cd_set_packages_repositories () {
|
||||
|
@ -121,6 +122,7 @@ deb https://deb.debian.org/debian bookworm-backports main
|
|||
deb https://deb.debian.org/debian bookworm-updates main
|
||||
deb https://deb.debian.org/debian-security bookworm-security main
|
||||
"
|
||||
cd_cat "/etc/apt/sources.list"
|
||||
;;
|
||||
"alma") echo "TODO" ;;
|
||||
*) cd_error_os "cd_set_packages_repositories" ;;
|
||||
|
@ -139,8 +141,9 @@ APT::Install-Recommends False;
|
|||
APT::Install-Suggests False;
|
||||
Dir::Etc::SourceParts \"\";
|
||||
"
|
||||
cd_cat "/etc/apt/apt.conf.d/apt.conf"
|
||||
;;
|
||||
"alma") cd_mkdir "/etc/dnf/dnf.conf.d" ;;
|
||||
"alma") mkdir "/etc/dnf/dnf.conf.d" || exit ;;
|
||||
*) cd_error_os "cd_set_packages_configuration" ;;
|
||||
esac
|
||||
}
|
||||
|
@ -152,11 +155,13 @@ cd_set_https_verification_off () {
|
|||
cd_write "/etc/apt/apt.conf.d/https" "\
|
||||
Acquire::https::Verify-Peer False;
|
||||
"
|
||||
cd_cat "/etc/apt/apt.conf.d/https"
|
||||
;;
|
||||
"alma")
|
||||
cd_write "/etc/dnf/dnf.conf.d/https.conf" "\
|
||||
sslverify=False
|
||||
"
|
||||
cd_cat "/etc/dnf/dnf.conf.d/https.conf"
|
||||
;;
|
||||
*) cd_error_os "cd_set_https_verification_off" ;;
|
||||
esac
|
||||
|
@ -288,7 +293,7 @@ ${1}
|
|||
|
||||
cd_cat () {
|
||||
if [ -f "${1}" ] ; then
|
||||
echo " ↙ /etc╭ $(realpath "${1}")"
|
||||
echo "╭$(realpath "${1}")"
|
||||
cat "${1}" || exit
|
||||
fi
|
||||
}
|
||||
|
@ -312,16 +317,9 @@ cd_install_package () {
|
|||
fi
|
||||
}
|
||||
|
||||
cd_mkdir () {
|
||||
if [ "${1}" ] ; then
|
||||
echo "→ ${1}"
|
||||
mkdir --parents "${1}" || exit
|
||||
fi
|
||||
}
|
||||
|
||||
cd_rm () {
|
||||
if [ -e "${1}" ] ; then
|
||||
echo "← $(realpath "${1}")"
|
||||
echo "× $(realpath "${1}")"
|
||||
rm --recursive "${1}" || exit
|
||||
fi
|
||||
}
|
||||
|
@ -344,7 +342,6 @@ local text="${2}"
|
|||
echo -n "${text}" \
|
||||
> "${file}" \
|
||||
|| exit
|
||||
cd_cat "${file}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue