2
0
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:
Joseph Werle 2015-02-21 17:07:36 -05:00
commit 248b2d1cfb

View File

@ -339,6 +339,9 @@ bpkg_install_from_remote () {
## make `deps/' directory if possible
mkdir -p "${cwd}/deps/${name}"
## make `deps/bin' directory if possible
mkdir -p "${cwd}/deps/bin"
## copy package.json over
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 "write" "${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
fi