Search code examples
automationshturbogears2

How automate using sh scripting


I'm a beginner with sh scripting and I need some help, can someone help me to convert this command lines extracted from Turbogears page to an sh script, thanks in advance.

$ virtualenv --no-site-packages tg2env
$ cd tg2env/
$ source bin/activate
(tg2env)$ pip install tg.devtools

Solution

  • Use an editor to create a file with these contents (and let's say it is called my_first_script.sh):

    #!/bin/sh
    
    virtualenv --no-site-packages tg2env
    cd tg2env/
    source bin/activate
    pip install tg.devtools
    

    Then execute this from command line to make it executable:

    chmod 755 my_first_script.sh