Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
6399a20ed1 | |||
2e0d42c040 |
11
zrep
11
zrep
@ -2,7 +2,7 @@
|
||||
|
||||
setopt extendedglob
|
||||
|
||||
VERSION="0.0.4" # Sun-2024-03-31
|
||||
VERSION="0.0.6" # Wed-2024-04-03
|
||||
ZREP="Zsh Repository Tool"
|
||||
# Define the default path to .zreprc
|
||||
ZREP_CONFIG="${HOME}/.zreprc"
|
||||
@ -174,7 +174,7 @@ function zrep_init() {
|
||||
zrep_install_dir = ${install_dir}
|
||||
|
||||
[global]
|
||||
repo_url = https://kekepower.com/zrep
|
||||
repo_url = https://zrep.kekepower.com
|
||||
theme = classic
|
||||
downloader = ${downloader}
|
||||
EOF
|
||||
@ -232,6 +232,8 @@ EOF
|
||||
zrep_global_downloader https://git.kekepower.com/kekePower/zrep/raw/branch/main/themes/classic -o ${install_dir}/themes/classic
|
||||
fi
|
||||
echo "zrep initialization complete."
|
||||
echo "You should copy 'zrep' to a path in you 'PATH' so that it's accessible."
|
||||
echo "For example '${HOME}/bin'"
|
||||
echo "Remember to 'source ${zshrc_file}' to load the 'zrep' settings."
|
||||
}
|
||||
|
||||
@ -646,6 +648,11 @@ function zrep_install_package() {
|
||||
else
|
||||
updates=false
|
||||
local package="${1}"
|
||||
# Ensure package name is in 'author/package' format
|
||||
if [[ ! "${package}" =~ ^.+/[^/]+$ ]]; then
|
||||
zrep_msg debug "\nError: Package name must be in 'author/package' format."
|
||||
return 1
|
||||
fi
|
||||
# Call zrep_check_if_installed to check if the package is already installed
|
||||
if zrep_check_if_installed "${package}"; then
|
||||
zrep_msg debug "\nPackage ${package} is already installed."
|
||||
|
Reference in New Issue
Block a user