mirror of
https://github.com/bpkg/bpkg
synced 2024-11-04 06:00:18 +00:00
Merge pull request #40 from juanpabloaj/bin-path
after local install, script to PATH
This commit is contained in:
commit
248b2d1cfb
@ -339,6 +339,9 @@ bpkg_install_from_remote () {
|
|||||||
## make `deps/' directory if possible
|
## make `deps/' directory if possible
|
||||||
mkdir -p "${cwd}/deps/${name}"
|
mkdir -p "${cwd}/deps/${name}"
|
||||||
|
|
||||||
|
## make `deps/bin' directory if possible
|
||||||
|
mkdir -p "${cwd}/deps/bin"
|
||||||
|
|
||||||
## copy package.json over
|
## copy package.json over
|
||||||
curl $auth_param -sL "${url}/package.json" -o "${cwd}/deps/${name}/package.json"
|
curl $auth_param -sL "${url}/package.json" -o "${cwd}/deps/${name}/package.json"
|
||||||
|
|
||||||
@ -349,6 +352,10 @@ bpkg_install_from_remote () {
|
|||||||
info "fetch" "${url}/${script}"
|
info "fetch" "${url}/${script}"
|
||||||
info "write" "${cwd}/deps/${name}/${script}"
|
info "write" "${cwd}/deps/${name}/${script}"
|
||||||
curl $auth_param -sL "${url}/${script}" -o "${cwd}/deps/${name}/${script}"
|
curl $auth_param -sL "${url}/${script}" -o "${cwd}/deps/${name}/${script}"
|
||||||
|
local scriptname="${script%.*}"
|
||||||
|
info "${scriptname} to PATH" "${cwd}/deps/bin/${scriptname}"
|
||||||
|
ln -si "${cwd}/deps/${name}/${script}" "${cwd}/deps/bin/${scriptname}"
|
||||||
|
chmod u+x "${cwd}/deps/bin/${scriptname}"
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user