Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # Ask for user input for gitUserId, personal token, and repository name
- echo "Enter your GitHub username:"
- read gitUserId
- echo "Enter your GitHub personal access token:"
- read personalToken
- echo "Enter the name of the new repository:"
- read repoName
- # Create a new empty repository on the user's GitHub account
- curl -u "${gitUserId}:${personalToken}" https://api.github.com/user/repos -d "{\"name\":\"${repoName}\"}"
- # Clone the repository to the local machine
- git clone https://github.com/${gitUserId}/${repoName}.git
- # Change to the repository directory
- cd ${repoName}
- # Clone the codebase of AirBnB_clone_v3 into the local repository
- git clone https://github.com/jzamora5/AirBnB_clone_v3.git
- # Move the contents of AirBnB_clone_v3 into the root directory of the local repository
- mv AirBnB_clone_v3/* .
- # Remove the empty AirBnB_clone_v3 directory
- rm -rf AirBnB_clone_v3
- # Change the remote URL of the local repository to the new repository on the user's GitHub account
- git remote set-url origin https://github.com/${gitUserId}/${repoName}.git
- # Change the URL in the .git/config file to the new repository on the user's GitHub account
- sed -i "s|https://github.com/jzamora5/AirBnB_clone_v3.git|https://github.com/${gitUserId}/${repoName}.git|g" .git/config
- # Add, commit, and push the changes to the new repository
- git add .
- git commit -m "Update ${repoName}"
- git push -u origin master
- # ------------------------------------------------------------
- sudo apt-get install -y python3-lxml &&
- sudo pip3 install flask_cors # if it was not installed yet &&
- sudo pip3 install flasgger &&
- sudo pip3 uninstall -y jsonschema &&
- sudo pip3 install jsonschema==3.0.1 &&
- sudo pip3 install pathlib2 &&
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement