This commit is contained in:
hl 2024-12-10 02:34:45 +08:00
parent 464f381418
commit 992a144097

View File

@ -32,8 +32,10 @@ APT::Install-Suggests "0";" | tee /etc/apt/apt.conf.d/01norecommend >/dev/null
cp "$AWD/assets/TINK-CA.crt" /usr/local/share/ca-certificates
update-ca-certificates
usermod -s /usr/bin/zsh $(whoami)
sed -i "s|/bin/bash|/usr/bin/zsh|g" /etc/passwd
}
personalize() {
mkdir -p $HOME/.config/fd
cp "$AWD/assets/ignore" $HOME/.config/fd/
cp "$AWD/assets/.zshrc" $HOME/
@ -55,14 +57,19 @@ usage(){
echo "Usage: $0 [OPTIONS]";
echo "OPTIONS:";
echo " -s skip install";
echo " -p personalize only";
}
DO_INSTALL=true;
while getopts ":s" OPT; do
DO_SYS_CONFIG=true;
while getopts ":sp" OPT; do
case $OPT in
s)
DO_INSTALL=false;
;;
p)
DO_SYS_CONFIG=false;
;;
?)
echo "Invalid Option: -$OPTARG";
usage;
@ -70,4 +77,7 @@ while getopts ":s" OPT; do
esac;
done;
configure $DO_INSTALL
if $DO_SYS_CONFIG; then
configure
fi
personalize $DO_INSTALL