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'