As per title. I want to have my code only downloadable by git, and I want to know how to move a script to the bin without have to use npm. Is there a certain way to do this without having to type the whole file path and the ./
? (Ex: $ ./do/this/really/long/script.sh
.) I want to be able to move the script into the bin under a certain name also. Is there a possible way to do this? Similar to npm's JSON bin?
{
"bin": {
"blah": "/do/this/really/long/script.sh"
},
}
I'm sure you're aware that github and npm are toooootally different things... right, good. As such there is simply no way to do what you want without users having to go through a manual process. As long as you make this clear in your README (along with copy/paste commands), most users shouldn't care.
Under the covers, npm is just creating symlinks to things. I don't know all the ins and out of what npm is doing, but you could do a number of things to achieve a similar goal:
Note: You can instruct users on how to do each of these manually, or you can write a copy/paste command to do it... but you have to figure that part out yourself.
Create an alias to your script.
Create symlinks to your script.
Update the $PATH
variable to include the path to your script. Paths can relative to the cwd
for bash consoles. So, if a user is currently bash'd into C:/foo/bar
, and your $PATH
is configured for ./bin
, then your OS will look for scripts inside C:/foo/bar/bin
.