Skip to content

Instantly share code, notes, and snippets.

@tbjgolden
Created January 30, 2018 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbjgolden/1f4a02ac565c1a415536932c03780a23 to your computer and use it in GitHub Desktop.
Save tbjgolden/1f4a02ac565c1a415536932c03780a23 to your computer and use it in GitHub Desktop.
Script used to help mark assignments at UC Berkeley Web Dev, with example urls.txt file
#!/bin/bash
touch urls.txt
CURR=`pwd`
if [ $# -ne 0 ]
then
let COUNT=0
mkdir $1
while read url
do
let COUNT++
cd $CURR
cd $1
NAME=`echo ${url:8} | rev | sed 's/:.*//' | rev | sed 's:\(.*\)/.*:\1:' | sed 's:.*/::'`
mkdir $NAME
cd $NAME
git clone $url . && npm install
done <urls.txt
if [ $COUNT -eq 0 ]
then
echo 'Put the git repo urls in urls.txt, line-separated'
fi
else
echo 'Argument for name of directory needed'
fi
https://github.com/atesoanelu/NYT-React-Search
https://github.com/hirabakhsh/nytreact
https://github.com/Momojunzi/nytreact
https://github.com/khosravi11/newsscrapereact
https://github.com/alexjr1194/NYT-React
https://github.com/Waldenism/NYT-React
https://github.com/mford008/nytreact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment