Skip to content

Instantly share code, notes, and snippets.

@MattRead
Created October 23, 2016 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattRead/328224213396335a46ca5b620ffa28df to your computer and use it in GitHub Desktop.
Save MattRead/328224213396335a46ca5b620ffa28df to your computer and use it in GitHub Desktop.
#!/usr/bin/env php
<?php
$type = trim(shell_exec('zenity --list --radiolist --column=Pick --column=Type TRUE Plugin FALSE Theme FALSE Other'));
switch ($type) {
case 'Plugin':
$repo = trim(shell_exec('zenity --entry --text="Repo Name"'));
$git = shell_exec("cd /home/matt/Projects/plugins; git clone git@github.com:habari-extras/{$repo}.git");
break;
case 'Theme':
$repo = trim(shell_exec('zenity --entry --text="Repo Name"'));
$git = shell_exec("cd /home/matt/Projects/themes; git clone git@github.com:habari-extras/{$repo}.git");
break;
case 'Other':
$repo = trim(shell_exec('zenity --entry --text="Repo URL"'));
$git = shell_exec("cd /home/matt/Projects; git clone {$repo}");
break;
}
shell_exec('zenity --info --text=done');
shell_exec('exo-open --launch FileManager /home/matt/Projects');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment