0

I have a lot of projects. And for each project, I have two files in them: setup and serve.

Each developer follows these simple three steps to start coding:

  1. git clone ...
  2. ./setup
  3. ./serve

The problem is that ./setup is not easy to type. And since this is a microservice architecture with a lot of repositories, ./setup and ./serve would be used frequently.

How can I make ubuntu understand that any time I write setup anywhere I mean there is a file called setup and you should run it.

This way developers would only configure their machines once, and then start coding using clone,setup,serve paradigm.

Saeed Neamati
  • 497
  • 1
  • 5
  • 16
  • 1
    There are a number of ways; `/usr/local/bin` for example is a directory searched by all users on the system, thus files (or shortcuts) placed in that directory will be found and run, as will anywhere in $PATH... If you're using commands that different products use (setup, clone are commands used by other software too) you'll have to be careful though... (you can also make $PWD part of your path.. but there are risks with that which is why it's not default!) – guiverc Jun 09 '21 at 07:11
  • There is a bit of explanation of PATH for executable files (binary programs, shellscripts etc) at [this link](https://askubuntu.com/questions/1344556/why-we-use-instead-of-just-typing-its-name-when-running-the-script/) and links from it. – sudodus Jun 09 '21 at 07:59

0 Answers0