Skip to content

Instantly share code, notes, and snippets.

@phoebe-leong
Last active October 5, 2021 03:35
Show Gist options
  • Save phoebe-leong/9555b8a50d4b77d3b0926c2a95401e8e to your computer and use it in GitHub Desktop.
Save phoebe-leong/9555b8a50d4b77d3b0926c2a95401e8e to your computer and use it in GitHub Desktop.
Github dependencies downloader
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