Update zrep script with autoload fix and debug message in zrep_install_package function.
- Fix autoload command in zrep script. - Add debug message in zrep_install_package function.
This commit is contained in:
parent
e314131622
commit
4337b13a28
6
zrep
6
zrep
@ -212,7 +212,7 @@ if [[ -n \${addons[@]} ]]; then
|
|||||||
if [[ -d \${addon} ]] && [[ ! " \${fpath[*]} " =~ " \${addon} " ]]; then
|
if [[ -d \${addon} ]] && [[ ! " \${fpath[*]} " =~ " \${addon} " ]]; then
|
||||||
fpath=(\${addon} "\${fpath[@]}") # Prepend the new addon to fpath
|
fpath=(\${addon} "\${fpath[@]}") # Prepend the new addon to fpath
|
||||||
fi
|
fi
|
||||||
autoload -Uz $(basename ${addon})
|
autoload -Uz \$(basename \${addon})
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "zrep: No addons enabled."
|
echo "zrep: No addons enabled."
|
||||||
@ -592,7 +592,7 @@ function zrep_install_package() {
|
|||||||
if [[ ${1} == "u" ]]; then
|
if [[ ${1} == "u" ]]; then
|
||||||
updates=true
|
updates=true
|
||||||
local package=${2}
|
local package=${2}
|
||||||
# echo "zrep_install_package: package=$package"
|
echo "zrep_install_package: package=$package"
|
||||||
else
|
else
|
||||||
updates=false
|
updates=false
|
||||||
local package="${1}"
|
local package="${1}"
|
||||||
@ -614,7 +614,7 @@ function zrep_install_package() {
|
|||||||
local zipFile="${tmpDir}/${author}-${script}-${version}.zip"
|
local zipFile="${tmpDir}/${author}-${script}-${version}.zip"
|
||||||
zrep_download_package "${zipFile}" "${dlurl}"
|
zrep_download_package "${zipFile}" "${dlurl}"
|
||||||
|
|
||||||
unzip -q -o "${zipFile}" -d "${config[main_zrep_install_dir]}"
|
unzip -o "${zipFile}" -d "${config[main_zrep_install_dir]}"
|
||||||
|
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
zrep_msg debug "\nError: Failed to unzip the package."
|
zrep_msg debug "\nError: Failed to unzip the package."
|
||||||
|
Loading…
Reference in New Issue
Block a user