From 6fb8cbbf3d4b3975db8654d6f135eaf881ba4788 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Mon, 9 Jan 2023 11:21:22 +0000 Subject: [PATCH] Update 2 files - /home/.chezmoiscripts/universal/run_onchange_after_20-apply-settings.mjs.tmpl - /home/dot_local/bin/executable_install-program --- .../run_onchange_after_20-apply-settings.mjs.tmpl | 7 ++++--- home/dot_local/bin/executable_install-program | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/home/.chezmoiscripts/universal/run_onchange_after_20-apply-settings.mjs.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_20-apply-settings.mjs.tmpl index 9b70885b..799e9f35 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_20-apply-settings.mjs.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_20-apply-settings.mjs.tmpl @@ -46,7 +46,8 @@ async function applyGsettings(settings) { try { const gsetting = setting.setting const gsettingVal = setting.value - await $`gsettings set ` + gsetting + `${gsettingVal}` + const gsettingCmd = 'gsettings set ' + gsetting + ' ' + gsettingVal + await $gsettingCmd } catch (e) { log('error', 'Gsettings Failure', 'Failed to apply gsetting') console.error(e) @@ -79,7 +80,8 @@ async function applyDconfSettings(settings) { if (dconf) { for (const setting of settings) { try { - await $`dconf write ${setting.key} ` + setting.value + const dconfCmd = 'dconf write ' + setting.key + ' ' + setting.value + await $dconfCmd } catch (e) { log('error', 'Dconf Failure', 'Failed to apply dconf setting') console.error(e) @@ -94,7 +96,6 @@ async function main() { const promises = [loadThemeSettings(), loadGnomeSettings()] const results = await Promise.all(promises) const themeSettings = results[0] - console.log(themeSettings) const gnomeSettings = results[1] const settingsPromises = [] if (themeSettings && themeSettings.gsetting_configs) { diff --git a/home/dot_local/bin/executable_install-program b/home/dot_local/bin/executable_install-program index f3434a66..d25fbab5 100644 --- a/home/dot_local/bin/executable_install-program +++ b/home/dot_local/bin/executable_install-program @@ -635,6 +635,9 @@ async function beforeInstall(packageManager) { updateDone[packageManager] = true const logStage = 'Pre-Install Package Manager' if (packageManager === 'appimage') { + if(!fileExists(`${process.env.HOME}/Applications)) { + runSilentCommand(`mkdir -p "${process.env.HOME}/Applications"`) + } } else if (packageManager === 'ansible') { log('info', logStage, `Temporarily enabling passwordless sudo for Ansible role installations`) await $`echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR ANSIBLE INSTALL" | sudo tee -a /etc/sudoers`