code: def install(self):
          
          logger.debug("")
  
          # If we're already installed, don't do anything.
          if self.installed:
              self.pr_info("pkg {} is already installed. Perhaps you want to update it?",
                      self.name)
              return
  
          self.clone()
          self.install_update_deps()
  
          logger.debug("Checking for install script")
  
          inst = os.path.join(self.repo_dir, '_upkg', 'install')
          if os.path.exists(inst):
              cwd = os.getcwd()
              logger.debug("chdir to %s", os.path.join(self.repo_dir, '_upkg'))
              logger.debug("install script is %s", inst)
              self.pr_info("Running install script at {}", inst)
              logger.debug("runnin script %s", inst)
              # We use subprocess instead of the sh module due to problems with
              # runing shell scripts with sh
              os.chdir(os.path.join(self.repo_dir, '_upkg'))
              subprocess.check_call(inst, shell=True)
              os.chdir(cwd)
              self.pr_pass("install script finished")
docs: todo: Docstring for install
          :return:
          :rtype: