Last active
June 16, 2021 22:24
-
-
Save BlazerYoo/eb25963039366cde47cb41f8e739bb8f to your computer and use it in GitHub Desktop.
Clone repo into replit without parent directory to immediately get coding [1]
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
#!/bin/bash | |
# first run chmod +x ./repl-repo1.sh | |
# then ./repl-repo.sh [link-to-repo.git] | |
echo '[1] Cloning repo...' | |
git clone $1 repo &> /dev/null | |
echo ' Cloned repo' | |
cd repo | |
echo '[2] Moving files...' | |
mv {.,}* .. &>/dev/null | |
echo ' Moved files' | |
cd .. | |
echo '[3] Removing parent directory...' | |
rm -r repo | |
echo ' Removed parent directory' | |
echo 'repl repo initialization complete' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Single line version: https://gist.github.com/BlazerYoo/6b0a8b5f19b69255bd695f6fecd779e4