From 2e1edd402ae72177875af1ffff3f97cb44bd2a08 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Thu, 12 Jan 2023 19:19:50 +0000 Subject: [PATCH] Update file run_onchange_after_6-bin-symlink.tmpl --- .../universal/run_onchange_after_6-bin-symlink.tmpl | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 home/.chezmoiscripts/universal/run_onchange_after_6-bin-symlink.tmpl diff --git a/home/.chezmoiscripts/universal/run_onchange_after_6-bin-symlink.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_6-bin-symlink.tmpl new file mode 100644 index 00000000..0f21bdaf --- /dev/null +++ b/home/.chezmoiscripts/universal/run_onchange_after_6-bin-symlink.tmpl @@ -0,0 +1,13 @@ +{{- if (ne .host.distro.family "windows") -}} +#!/usr/bin/env bash + +{{ includeTemplate "universal/profile" }} +{{ includeTemplate "universal/logg" }} + +### Symlink python3 to python if it is unavailable +if ! command -v python > /dev/null && command -v python3 > /dev/null; then + logg info 'Symlinking `python3` to `python` since the latter is unavailable' + sudo ln -s "$(which python3)" /usr/local/bin/python +fi + +{{ end -}}