From ba1829953c93b459a5ca02392a3d01f1f171fb04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Fri, 15 Mar 2024 23:58:20 +0100 Subject: [PATCH] Added directory creation for install_dir Added autoload for zini Added creation of .addons file Added installation of Classic theme Updated zrep initialization process --- zrep | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/zrep b/zrep index b4e7447..49ff109 100755 --- a/zrep +++ b/zrep @@ -157,6 +157,7 @@ function zrep_init() { # Prompt user for install directory read "install_dir?Enter zrep installation directory [${HOME}/.zrep]: " install_dir=${install_dir:-"${HOME}/.zrep"} + mkdir -p ${install_dir} read "downloader?Choose command to download packages [curl, wget, wget2]: " if [[ ${downloader} != curl && ${downloader} != wget && ${downloader} != wget2 ]]; then echo "Invalid choice: '$downloader'. Try again." @@ -191,6 +192,7 @@ EOF curl -s https://raw.githubusercontent.com/kekePower/zini/main/zini -o "${install_dir}/functions/zini/zini" echo "Adding 'zini' path to fpath in ${zshrc_file}" echo "fpath=(${install_dir}/functions/zini \$fpath)" >> ${zshrc_file} + autoload -Uz zini fi # Check if .zshrc already sources .zrep_addons, if not, add it @@ -202,6 +204,7 @@ EOF # Create or update the .zrep_addons file if [[ ! -f ${zrep_addons} ]]; then echo "Creating file ${zrep_addons}..." + touch ${install_dir}/.addons cat > "${zrep_addons}" <