Hi,
I’ve been working hard on my stackscript this week and I have been making some progress with some help as well. This is the bit I am confused about. I would like to import my code from my private bitbucket git repo to my server automatically in the stackscript.
Firstly, I found this code in other peoples stackscripts. Then in this code, there was further code to grab the source from github:
Code:
cd /home/$USERNAME/
sudo -u $USERNAME wget "https://raw.github.com/gist/1210041/6f04294a6b80a6bf8d79a3530823d9449b8dee41/create_project.sh"
sudo -u $USERNAME chmod +x create_project.sh
What is the point of this create_project.sh? I just don’t get why we would want to fetch a script, to fetch the code, rather than just fetching the code to start with.
Secondly, if I want to clone my git repo to my server I was planning to use the following code:
Code:
cd /home/$USERNAME/
git branch live
git clone https://James@bitbucket.org/James/mywork.git
git push live
Now, again please appreciate this stuff is way over my head and I’m just trying to stumble through like an idiot to get this working. Could anyone offer me some advice as to the correct way to do this.
Regards,
James