Created
October 23, 2016 01:01
-
-
Save MattRead/328224213396335a46ca5b620ffa28df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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