Skip to content
Open
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
55 changes: 55 additions & 0 deletions src/common-utils/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,53 @@ install_alpine_packages() {
PACKAGES_ALREADY_INSTALLED="true"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we bump the minor version for this Feature?

}

# Arch Linux packages

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install_arch_packages() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
pacman -Sy --noconfirm --noprogressbar \
openssh \
gnupg \
procps \
lsof \
htop \
net-tools \
psmisc \
curl \
wget \
rsync \
ca-certificates \
unzip \
zip \
nano \
vim \
less \
jq \
gcc \
tzdata \
zlib \
sudo \
coreutils \
sed \
grep \
which \
ncdu \
shadow \
strace

# Install git if not already installed (may be more recent than distro version)
if ! type git > /dev/null 2>&1; then
pacman -Sy --noconfirm --noprogressbar git
fi
fi

# Install zsh if needed
if [ "${INSTALL_ZSH}" = "true" ] && ! type zsh > /dev/null 2>&1; then
pacman -Sy --noconfirm --noprogressbar zsh
fi

PACKAGES_ALREADY_INSTALLED="true"
}

# ******************
# ** Main section **
# ******************
Expand Down Expand Up @@ -341,6 +388,8 @@ elif [[ "${ID}" = "rhel" || "${ID}" = "fedora" || "${ID}" = "mariner" || "${ID_L
ADJUSTED_ID="rhel"
elif [ "${ID}" = "alpine" ]; then
ADJUSTED_ID="alpine"
elif [ "${ID}" = "arch" ]; then
ADJUSTED_ID="arch"
else
echo "Linux distro ${ID} not supported."
exit 1
Expand All @@ -357,6 +406,9 @@ case "${ADJUSTED_ID}" in
"alpine")
install_alpine_packages
;;
"arch")
install_arch_packages
;;
esac

# If in automatic mode, determine if a user already exists, if not use vscode
Expand Down Expand Up @@ -458,6 +510,9 @@ if [ "${RC_SNIPPET_ALREADY_ADDED}" != "true" ]; then
# /etc/bash/bashrc does not exist in alpine 3.14 & 3.15
mkdir -p /etc/bash
;;
"arch")
global_rc_path="/etc/bash.bashrc"
;;
esac
cat "${FEATURE_DIR}/scripts/rc_snippet.sh" >> ${global_rc_path}
cat "${FEATURE_DIR}/scripts/bash_theme_snippet.sh" >> "${user_home}/.bashrc"
Expand Down