XBMC Community Forum
Is this the proper way to "git" alaska? - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Skin Help and Support (/forumdisplay.php?fid=67)
+---- Forum: Alaska (/forumdisplay.php?fid=126)
+---- Thread: Is this the proper way to "git" alaska? (/showthread.php?tid=64020)



Is this the proper way to "git" alaska? - Evanrich - 2009-12-13 03:19

Like what I did there with the title?


I'm just wondering if this is the proper way to git-pull alaska on ubuntu...I've never done it this way, I'm used to downloading the zip's, so let me know if this is wrong please Smile I pulled the directions from the Aeon how-to, and changed the names to what I have or what I think they should be.

rickatnight11 Wrote:2.1 Using Git (Ubuntu Linux)
  • Open up Applications->Accessories->Terminal and navigate to the XBMC skin directory. Unless you have manually changed something you should be able to run the following command to go straight to it from wherever:
    Code:
    cd ~/.xbmc/skin
  • Clone the alaska repository with the git clone command optionally followed by the directory you would like created for it. Below are some examples:

    Run the following command to initialize the repository into the default "alaska" directory:
    Code:
    git clone git://github.com/HitcherUK/Alaska.git

    Run the following command to initialize the repository into the directory "Alaska"
    Code:
    git clone git://github.com/HitcherUK/Alaska.git "Alaska"
  • You can now cd into the directory (or one of the directories) you created. Remember, the path needs quotes around it if it contains spaces.
    Code:
    cd "Alaska"
  • If you are content with the default main branch (that contains the stable Alaska) then you can simply run git pull to make sure the repository is up to date. If you would like to use the "master" branch then you will need to run the following command first:
    Code:
    git checkout -b master origin/master
    This will change your active branch to "master". Now you can run git pull to download the changes from that branch.
You can now navigate to and run git pull from any of the directories you created with Git Bash, and the latest changes will be downloaded.



- hikaricore - 2009-12-13 03:28

That looks to be it but I don't think you need this step:

Quote:git checkout -b master origin/master

You've already run git clone so a checkout seems redundant.


- uncertainty - 2009-12-13 04:14

hikaricore Wrote:That looks to be it but I don't think you need this step:



You've already run git clone so a checkout seems redundant.

That is correct as the additional step for the Aeon git was due to multiple branches available. Alaska atm has just one branch..


- mcborzu - 2009-12-13 04:26

I love git, at first it seemed kind of confusing but it's really easy once you have the skin downloaded to update:

cd "h:\Program Files\XBMC\skin" -which is saved so all I have to do is press up twice

then:

cd Alaska

then:

git pull


- Evanrich - 2009-12-13 04:28

thanks for the replies. I tried it, without the last line of course (just git-pull) and it worked...very easy.

Now, anyone here good with bash scripting know how i can write something that I can run from the command line when I log in as XBMC or root users to make this even simpler? I know how to do it with batch files of course, but I know nothing about unix scripting. Either that, or perhaps someway to setup a cron-job to run a check every other day or so?

Edit, just found a tutorial, would it be as easy as something like this?

Quote:#!/bin/bash
cd /home/xbmc/.xbmc/skin/Alaska
git pull



- hikaricore - 2009-12-13 04:45

That'll do it, just save that script in your home folder or something, chmod +x the file, and add it to cron.
Just be aware that this could cause skin breakage if you git pull while hitcher is in the middle of updating or something. Tongue
Fairly unlikely occurrence but things happen.


- Evanrich - 2009-12-13 05:03

hikaricore Wrote:That'll do it, just save that script in your home folder or something, chmod +x the file, and add it to cron.
Just be aware that this could cause skin breakage if you git pull while hitcher is in the middle of updating or something. Tongue
Fairly unlikely occurrence but things happen.

dumb question, but where is the cron job log located? I checked /etc but can't find a cron list in there, and tried running "crontab" but it can't find that either...where is it located? I've searched and found posts saying how to create cron jobs, but nothing yet on where to actually find it? I'm running the Live version installed to a SSD


- uncertainty - 2009-12-13 05:36

Evanrich Wrote:dumb question, but where is the cron job log located?

By default it should be in /var/log/syslog


- hikaricore - 2009-12-13 05:50

uncertainty Wrote:By default it should be in /var/log/syslog

lol wut? that's not where cron stores anything... that would be the syslog (system log) file

Just open a terminal and type:

Code:
crontab -e

Wikipedia does a half decent job of explaining the rest.

http://en.wikipedia.org/wiki/Crontab#Operators


- Evanrich - 2009-12-13 06:22

hikaricore Wrote:lol wut? that's not where cron stores anything... that would be the syslog (system log) file

Just open a terminal and type:

Code:
crontab -e

Wikipedia does a half decent job of explaining the rest.

http://en.wikipedia.org/wiki/Crontab#Operators

doesnt' look like it exists... did both a "find" for it, and tried running it, thats why i had to ask Smile I'm thinking I might need to "apt-get install cron" to get this to work.
[Image: 2j48vow.jpg]

EDIT: so just did a backup (to be safe) and then ran the apt-get install cron command, i now have crontab...looks like it's not included in the LIVE Iso.

Thanks for the help guys Smile


- uncertainty - 2009-12-13 20:34

hikaricore Wrote:lol wut? that's not where cron stores anything... that would be the syslog (system log) file

Just open a terminal and type:

Code:
crontab -e

Depends on the version of ubuntu....7.x stores cron logs in the syslog file by default....
Don't shoot the messenger...heh