-
-
Save Darkle/eb7b423bdec0bf12b6345a0a4fd6a9a8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| cloneinside_func() { | |
| node -p ' | |
| var repoUrl = "'"$1"'"; | |
| repoUrl = repoUrl.slice(0,-4) + "/archive/master.zip"; | |
| if(repoUrl.startsWith("git@github.com:")){ | |
| repoUrl = "https://github.com/" + repoUrl.slice(15) | |
| }; | |
| var spawn = require("child_process").spawn; | |
| spawn("wget " + repoUrl,{ stdio: "inherit", shell: true });' > /dev/null 2>&1 | |
| unzip -n ./master.zip -d ./cloneinside-tmp | |
| cd cloneinside-tmp/* | |
| rsync -r ./ ../../ | |
| cd ../.. | |
| rm -r cloneinside-tmp | |
| rm ./master.zip | |
| } | |
| alias cloneinside=cloneinside_func original.conf my.co |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment