Don't download existing sources
This commit is contained in:
parent
d1becc7836
commit
c8b1f67bdd
18
zpac
18
zpac
|
@ -72,6 +72,13 @@ aur.get() {
|
||||||
jshon -e results -e PackageBase -u -p -e URLPath -u <<< "$pkg_aur_info"
|
jshon -e results -e PackageBase -u -p -e URLPath -u <<< "$pkg_aur_info"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(( flag_force )) || {
|
||||||
|
[[ -d "${cfg_workdir}/${pkg_base}" ]] && {
|
||||||
|
echo "Found ${pkg_base} in ${cfg_workdir}, skipping. Use -f to override."
|
||||||
|
return 17
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cd "$cfg_workdir"
|
cd "$cfg_workdir"
|
||||||
|
|
||||||
echo "Downloading ${cfg_aur_url}${tarball_path}"
|
echo "Downloading ${cfg_aur_url}${tarball_path}"
|
||||||
|
@ -100,8 +107,13 @@ aur.get() {
|
||||||
aur_deps=( $( jshon -e results -a -e Name -u <<< "$aur_deps_api_data" ) )
|
aur_deps=( $( jshon -e results -a -e Name -u <<< "$aur_deps_api_data" ) )
|
||||||
|
|
||||||
for i in "${aur_deps[@]}"; do
|
for i in "${aur_deps[@]}"; do
|
||||||
aur.get < <(aur.info "$i") || {
|
aur.get < <(aur.info "$i")
|
||||||
return "$?"
|
_result="$?"
|
||||||
|
|
||||||
|
(( _result )) && {
|
||||||
|
(( _result == 17 )) || {
|
||||||
|
return "$_result"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
@ -182,6 +194,8 @@ main() {
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
(-f) flag_force=1;;
|
||||||
|
|
||||||
(--) shift; break;;
|
(--) shift; break;;
|
||||||
(-*)
|
(-*)
|
||||||
err "Unknown key: $1"
|
err "Unknown key: $1"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user