Fix: wrong way to compare string, revert bcdd0ec481

This commit is contained in:
leafee98 2023-03-25 21:20:41 +08:00
parent bcdd0ec481
commit 5e6a2aac7f

View file

@ -94,9 +94,9 @@ function url_type {
echo "http" echo "http"
elif [[ "${url}" == https://* ]] ; then elif [[ "${url}" == https://* ]] ; then
echo "https" echo "https"
elif [[ "${url}" == "file//*" ]]; then elif [[ "${url}" == file//* ]]; then
echo "file" echo "file"
elif [[ "${url}" != "*://*" ]] ; then elif [[ "${url}" != *://* ]] ; then
echo "file" echo "file"
else else
err "Unkown url schema: %s" "${url}" err "Unkown url schema: %s" "${url}"
@ -138,7 +138,7 @@ function extract_source_single {
git --git-dir "${workspace}/${file_name}" --work-tree="${srcdir}" restore --source="${restore_source}" . git --git-dir "${workspace}/${file_name}" --work-tree="${srcdir}" restore --source="${restore_source}" .
;; ;;
*) *)
ln --symbolic $(realpath "${workspace}/${url}") "${srcdir}/${file_name}" ln --symbolic $(realpath "${workspace}/${file_name}") "${srcdir}/${file_name}"
decompress_source_file "${file_name}" decompress_source_file "${file_name}"
;; ;;
esac esac