@@ -113,7 +113,7 @@ if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
113113 manpages \
114114 manpages-dev \
115115 init-system-helpers"
116-
116+
117117 # Needed for adding manpages-posix and manpages-posix-dev which are non-free packages in Debian
118118 if [ " ${ADD_NON_FREE_PACKAGES} " = " true" ]; then
119119 # Bring in variables from /etc/os-release like VERSION_CODENAME
@@ -124,7 +124,7 @@ if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
124124 sed -i -E " s/deb-src http:\/\/(deb|httpredir)\.debian\.org\/debian ${VERSION_CODENAME} -updates main/deb http:\/\/\1\.debian\.org\/debian ${VERSION_CODENAME} -updates main contrib non-free/" /etc/apt/sources.list
125125 sed -i " s/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME} \/updates main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME} \/updates main contrib non-free/" /etc/apt/sources.list
126126 sed -i " s/deb-src http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME} \/updates main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME} \/updates main contrib non-free/" /etc/apt/sources.list
127- sed -i " s/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME} -backports main/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME} -backports main contrib non-free/" /etc/apt/sources.list
127+ sed -i " s/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME} -backports main/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME} -backports main contrib non-free/" /etc/apt/sources.list
128128 sed -i " s/deb-src http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME} -backports main/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME} -backports main contrib non-free/" /etc/apt/sources.list
129129 # Handle bullseye location for security https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html
130130 sed -i " s/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME} -security main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME} -security main contrib non-free/" /etc/apt/sources.list
@@ -140,7 +140,7 @@ if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
140140 if [[ ! -z $( apt-cache --names-only search ^libssl1.1$) ]]; then
141141 package_list=" ${package_list} libssl1.1"
142142 fi
143-
143+
144144 # Install appropriate version of libssl1.0.x if available
145145 libssl_package=$( dpkg-query -f ' ${db:Status-Abbrev}\t${binary:Package}\n' -W ' libssl1\.0\.?' 2>&1 || echo ' ' )
146146 if [ " $( echo " $LIlibssl_packageBSSL " | grep -o ' libssl1\.0\.[0-9]:' | uniq | sort | wc -l) " -eq 0 ]; then
@@ -155,7 +155,7 @@ if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
155155
156156 echo " Packages to verify are installed: ${package_list} "
157157 apt-get -y install --no-install-recommends ${package_list} 2> >( grep -v ' debconf: delaying package configuration, since apt-utils is not installed' >&2 )
158-
158+
159159 # Install git if not already installed (may be more recent than distro version)
160160 if ! type git > /dev/null 2>&1 ; then
161161 apt-get -y install --no-install-recommends git
174174# Ensure at least the en_US.UTF-8 UTF-8 locale is available.
175175# Common need for both applications and things like the agnoster ZSH theme.
176176if [ " ${LOCALE_ALREADY_SET} " != " true" ] && ! grep -o -E ' ^\s*en_US.UTF-8\s+UTF-8' /etc/locale.gen > /dev/null; then
177- echo " en_US.UTF-8 UTF-8" >> /etc/locale.gen
177+ echo " en_US.UTF-8 UTF-8" >> /etc/locale.gen
178178 locale-gen
179179 LOCALE_ALREADY_SET=" true"
180180fi
183183group_name=" ${USERNAME} "
184184if id -u ${USERNAME} > /dev/null 2>&1 ; then
185185 # User exists, update if needed
186- if [ " ${USER_GID} " != " automatic" ] && [ " $USER_GID " != " $( id -g $USERNAME ) " ]; then
186+ if [ " ${USER_GID} " != " automatic" ] && [ " $USER_GID " != " $( id -g $USERNAME ) " ]; then
187187 group_name=" $( id -gn $USERNAME ) "
188188 groupmod --gid $USER_GID ${group_name}
189189 usermod --gid $USER_GID $USERNAME
190190 fi
191- if [ " ${USER_UID} " != " automatic" ] && [ " $USER_UID " != " $( id -u $USERNAME ) " ]; then
191+ if [ " ${USER_UID} " != " automatic" ] && [ " $USER_UID " != " $( id -u $USERNAME ) " ]; then
192192 usermod --uid $USER_UID $USERNAME
193193 fi
194194else
198198 else
199199 groupadd --gid $USER_GID $USERNAME
200200 fi
201- if [ " ${USER_UID} " = " automatic" ]; then
201+ if [ " ${USER_UID} " = " automatic" ]; then
202202 useradd -s /bin/bash --gid $USERNAME -m $USERNAME
203203 else
204204 useradd -s /bin/bash --uid $USER_UID --gid $USERNAME -m $USERNAME
@@ -213,7 +213,7 @@ if [ "${USERNAME}" != "root" ] && [ "${EXISTING_NON_ROOT_USER}" != "${USERNAME}"
213213fi
214214
215215# ** Shell customization section **
216- if [ " ${USERNAME} " = " root" ]; then
216+ if [ " ${USERNAME} " = " root" ]; then
217217 user_rc_path=" /root"
218218else
219219 user_rc_path=" /home/${USERNAME} "
250250# Set the default git editor if not already set
251251if [ -z "$(git config --get core.editor)" ] && [ -z "${GIT_EDITOR}" ]; then
252252 if [ "${TERM_PROGRAM}" = "vscode" ]; then
253- if [[ -n $(command -v code-insiders) && -z $(command -v code) ]]; then
253+ if [[ -n $(command -v code-insiders) && -z $(command -v code) ]]; then
254254 export GIT_EDITOR="code-insiders --wait"
255- else
255+ else
256256 export GIT_EDITOR="code --wait"
257257 fi
258258 fi
@@ -329,7 +329,7 @@ codespaces_zsh="$(cat \
329329# Codespaces zsh prompt theme
330330__zsh_prompt() {
331331 local prompt_username
332- if [ ! -z "${GITHUB_USER}" ]; then
332+ if [ ! -z "${GITHUB_USER}" ]; then
333333 prompt_username="@${GITHUB_USER}"
334334 else
335335 prompt_username="%n"
0 commit comments