From a495ad0ea2de0908b8f0cfc5d8d1601e6e7478e3 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Wed, 4 Jan 2023 05:39:50 +0000 Subject: [PATCH] Update file run_onchange_after_12-install-packages.tmpl --- .../universal/run_onchange_after_12-install-packages.tmpl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/home/.chezmoiscripts/universal/run_onchange_after_12-install-packages.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_12-install-packages.tmpl index a3e252c2..17d7ac76 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_12-install-packages.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_12-install-packages.tmpl @@ -17,6 +17,14 @@ if command -v install-program > /dev/null; then sudo echo "Sudo access granted." export DEBIAN_FRONTEND=noninteractive export HOMEBREW_NO_ENV_HINTS=true + if ! command -v gcc-11; then + if command -v gcc; then + log info 'gcc-11 command missing. Symlinking to gcc' + sudo ln -s "$(which gcc)" /usr/local/bin/gcc-11 + else + log warn 'gcc either needs to be added to the PATH or it is missing' + fi + fi install-program {{ $softwareList }} else logg error '`zx` is not available'