Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(chezmoi): simplify package installation scripts #113

Merged
merged 1 commit into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions chezmoi/.chezmoitemplates/install-apt-prerequisites
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ else
echo "${output}"
exit 1
fi
c sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes -qq -o=Dpkg::Use-Pty=0 --no-install-recommends ca-certificates
c sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes -qq -o=Dpkg::Use-Pty=0 --no-install-recommends curl wget gnupg \
c sudo apt-get install --yes -qq -o=Dpkg::Use-Pty=0 --no-install-recommends ca-certificates
c sudo apt-get install --yes -qq -o=Dpkg::Use-Pty=0 --no-install-recommends curl wget gnupg \
software-properties-common zsh locales locales-all jq gettext autoconf apt-transport-https zip bzip2 unzip

# Add APT repositories for newer versions of Git.
Expand All @@ -24,7 +24,7 @@ c sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes -qq -o=Dpkg::Use-Pty
c sudo rm -f etc/apt/sources.list.d/git-core-*.list*
c sudo add-apt-repository ppa:git-core/ppa --yes
c sudo apt-get update --yes
c sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes -qq -o=Dpkg::Use-Pty=0 --no-install-recommends git
c sudo apt-get install --yes -qq -o=Dpkg::Use-Pty=0 --no-install-recommends git

# Set up locales
# check if locale is already set up by running locale | grep LC_ALL | grep en_US.UTF-8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ done
if [[ ${#missing_packages[@]} -gt 0 ]] || [[ ${#upgrade_packages[@]} -gt 0 ]]; then
# This script also gets called when running rootmoi
if [ "$USER" = "root" ]; then
apt_command=(DEBIAN_FRONTEND=noninteractive apt-get)
apt_command=(apt-get)
else
apt_command=(sudo DEBIAN_FRONTEND=noninteractive apt-get)
apt_command=(sudo apt-get)
fi

c "${apt_command[@]}" update --yes -qq -o=Dpkg::Use-Pty=0
Expand Down