bash script newrepo and updatewebsite complete

This commit is contained in:
akilan
2020-05-10 15:03:57 +04:00
parent 95bf80fe1a
commit 8c14650b51
3 changed files with 47 additions and 44 deletions

View File

@@ -1,14 +1,19 @@
#!/bin/sh
reponame="$1"
GITHUBUSER=$(git config github.user)
if [ "$reponame" = "" ]; then
read -p "Enter Github Repository Name: " reponame
fi
mkdir ./$reponame
cd $reponame
curl -u USERNAME https://api.github.com/user/repos -d "{\"name\":\"$reponame\"}"
curl -u $2:$3 https://api.github.com/user/repos -d "{\"name\":\"$reponame\"}"
git init
echo "ADD README CONTENT" > README.md
git add README.md
git commit -m "Starting Out"
git remote add origin git@github.com:USERNAME/$reponame.git
git remote add origin git@github.com:$2/$reponame.git
git push -u origin master

View File

@@ -1,2 +1,4 @@
#!/bin/sh
git add-commit -m "Update website"
git push -u origin master