title: How to run multiple bash/sh scripts in setup.py file?
body: <p>I have 2 scripts: <code>startup.sh</code> and <code>desktopsetup.sh</code> in the folder <code>bin</code>. Below is the code for my <code>setup.py</code>.</p>
  
  <pre><code>from setuptools import setup
  from setuptools.command.install import install
  import os
  
  class MyInstall(install):
      def run(self):
          install.run(self)
          path = os.getcwd().replace(" ", "\ ").replace("(","\(").replace(")","\)") + "/bin/"
          os.system("echo 'Setting up Tzara.desktop'")
          os.system("chmod +x "+path+"desktopsetup.sh")
          os.system("sh "+path+"desktopsetup.sh")
          os.system("chmod +x "+path+"startup.sh")
          os.system("sh "+path+"startup.sh")
  
  
  setup(name='Tzara---A-Personal-Assistant',
        version='1.0.6',
        description='A Virtual Personal Assistant',
        url='https://github.com/Suman7495/Tzara---A-Personal-Assistant',
        author='MyName',
        author_email='myemail@gmail.com',
        license='MIT',
        packages=['tzara'],
        classifiers=['Development Status :: 4 - Beta',
        'Programming Language :: Python :: 2.7',            
        ],
        scripts=['bin/desktopsetup.sh', 'bin/startup.sh'],
        cmdclass={'install': MyInstall},
  )
  </code></pre>
  
  <p>When I run it, using <code>python install setup.py</code>, only <code>startup.sh</code> runs, <code>desktopsetup.sh</code> does not run.</p>
  
  <p>Here is my <code>desktopsetup.sh</code> code:</p>
  
  <pre><code>#!/bin/bash
  STR=$'[Desktop Entry]
  Encoding=UTF-8
  Type=Application
  Name=Tzara
  Comment=A Virtual Personal Assistant
  Exec=guake -n guake -t -e "python /usr/local/lib/python2.7/dist-packages/tzara/main.pyc" guake -r "Tzara"
  Terminal=True
  Type=Application
  Categories=Application'
  if [ ! -e /usr/share/applications/Tzara.desktop  ]; then
    echo "Setting up .desktop file"
    echo "$STR" | sudo tee sudo /usr/share/applications/Tzara.desktop &gt; /dev/null
    read -n1 -r -p "Press any key to continue..." key
  fi
  </code></pre>
  
  <p>Do find <a href="https://github.com/Suman7495/Tzara---A-Personal-Assistant" rel="nofollow noreferrer">the details of my code here.</a></p>
  
  <p>I would deeply appreciate if somebody could offer a little help.</p>