Skip to content

Commit

Permalink
feat(snap): install and enable snap
Browse files Browse the repository at this point in the history
  • Loading branch information
tanducmai committed Oct 13, 2023
1 parent 69d1eff commit 7cdc1bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions commit_convention.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ scopes:
ondir: a small program to automate tasks specific to certain directories
program: general command-line utilities
python: a high-level, general-purpose programming language
snap: a software deployment and package management system
wsl: a feature that enables Windows users to run a Linux environment on Windows
8 changes: 6 additions & 2 deletions install/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,16 @@ symlink_config "bash" "bash*"
symlink_config "bash" "*rc"
symlink_config "bash" "selected_editor"

log_task "Installing snap ..."
sudo apt install snapd
sudo systemctl enable --now snapd snapd.apparmor

log_task "Installing Linux packages ..."
# shellcheck disable=SC2310
for pkg in "${LINUX_PKGS[@]}"; do
(yes | sudo apt install "${pkg}" 2>> /tmp/install-pkg-error.txt) \
|| ([[ -x "$(command -v snap)" ]] \
&& sudo snap install "${pkg}" 2>> /tmp/install-pkg-error.txt)
|| (sudo snap install "${pkg}" 2>> /tmp/install-pkg-error.txt \
|| sudo snap install "${pkg}" --classic 2>> /tmp/install-pkg-error.txt)
done
yes | sudo apt autoremove
yes | sudo apt autoclean
Expand Down

0 comments on commit 7cdc1bd

Please sign in to comment.