Is this the proper way to "git" alaska?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Evanrich Offline
Fan
Posts: 491
Joined: Nov 2008
Reputation: 0
Location: Sunnyvale, CA
Post: #1
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.

Board: Zotac ION-A-U Case: M350 Mini ITX Memory: 4GB Patriot PC6400 OS: XBMC on OpenELEC.tv build 6936 on a Corsair 32GB SSD Media Storage: W2K8 running on 14TB RAID 5 on an Asrock board w/ AMD Athlon X2 250 and PERC 6/I controller w/ 8 Samsung HD204UI Green drives Time to interface from power switch: 22.4 seconds.
find quote
hikaricore Offline
Posting Freak
Posts: 1,515
Joined: Dec 2008
Reputation: 0
Location: Tuesday
Post: #2
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.
find quote
uncertainty Offline
Fan
Posts: 499
Joined: Jun 2009
Reputation: 0
Location: Jersey
Post: #3
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..
find quote
mcborzu Offline
Skilled Skinner
Posts: 3,381
Joined: Feb 2009
Reputation: 15
Location: dsf
Post: #4
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
find quote
Evanrich Offline
Fan
Posts: 491
Joined: Nov 2008
Reputation: 0
Location: Sunnyvale, CA
Post: #5
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

Board: Zotac ION-A-U Case: M350 Mini ITX Memory: 4GB Patriot PC6400 OS: XBMC on OpenELEC.tv build 6936 on a Corsair 32GB SSD Media Storage: W2K8 running on 14TB RAID 5 on an Asrock board w/ AMD Athlon X2 250 and PERC 6/I controller w/ 8 Samsung HD204UI Green drives Time to interface from power switch: 22.4 seconds.
(This post was last modified: 2009-12-13 04:31 by Evanrich.)
find quote
hikaricore Offline
Posting Freak
Posts: 1,515
Joined: Dec 2008
Reputation: 0
Location: Tuesday
Post: #6
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.
find quote
Evanrich Offline
Fan
Posts: 491
Joined: Nov 2008
Reputation: 0
Location: Sunnyvale, CA
Post: #7
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

Board: Zotac ION-A-U Case: M350 Mini ITX Memory: 4GB Patriot PC6400 OS: XBMC on OpenELEC.tv build 6936 on a Corsair 32GB SSD Media Storage: W2K8 running on 14TB RAID 5 on an Asrock board w/ AMD Athlon X2 250 and PERC 6/I controller w/ 8 Samsung HD204UI Green drives Time to interface from power switch: 22.4 seconds.
find quote
uncertainty Offline
Fan
Posts: 499
Joined: Jun 2009
Reputation: 0
Location: Jersey
Post: #8
Evanrich Wrote:dumb question, but where is the cron job log located?

By default it should be in /var/log/syslog
find quote
hikaricore Offline
Posting Freak
Posts: 1,515
Joined: Dec 2008
Reputation: 0
Location: Tuesday
Post: #9
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
find quote
Evanrich Offline
Fan
Posts: 491
Joined: Nov 2008
Reputation: 0
Location: Sunnyvale, CA
Post: #10
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

Board: Zotac ION-A-U Case: M350 Mini ITX Memory: 4GB Patriot PC6400 OS: XBMC on OpenELEC.tv build 6936 on a Corsair 32GB SSD Media Storage: W2K8 running on 14TB RAID 5 on an Asrock board w/ AMD Athlon X2 250 and PERC 6/I controller w/ 8 Samsung HD204UI Green drives Time to interface from power switch: 22.4 seconds.
(This post was last modified: 2009-12-13 06:43 by Evanrich.)
find quote
uncertainty Offline
Fan
Posts: 499
Joined: Jun 2009
Reputation: 0
Location: Jersey
Post: #11
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
(This post was last modified: 2009-12-13 20:40 by uncertainty.)
find quote