Last active
October 5, 2021 03:35
-
-
Save phoebe-leong/9555b8a50d4b77d3b0926c2a95401e8e to your computer and use it in GitHub Desktop.
Github dependencies downloader
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
import os | |
import sys | |
def main(): | |
if len(sys.argv) == 1: | |
print("You must provide at least one file to read!") | |
return -1 | |
else: | |
for arg in range(len(sys.argv) - 1): | |
if os.path.exists(sys.argv[arg + 1]): | |
file = open(sys.argv[arg + 1], "r") | |
for line in file: | |
if line != "\n": | |
os.system("git clone https://github.com/" + line) | |
file.close() | |
else: | |
print(">> File \"" + sys.argv[arg + 1] + "\" does not exist!") | |
return 0 | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment