Kodi Community Forum
XBMC-Live Install script. For Minimal Unbuntu Install - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: XBMC-Live Install script. For Minimal Unbuntu Install (/showthread.php?tid=69753)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14


- X3lectric - 2010-08-21

well either way that part of script you mentioned are only requirements for script the other cryptic function is the script auto-update, neither would cause the problem you describe.


- outleradam - 2010-08-21

I'm not having a problem with your script at all. I am using it as a guideline on ubuntu 10.10 since xbmcbuntu instructions are broke


- X3lectric - 2010-08-21

I was trying to explain what function f_AgtB(){ } is the scrit auto update so you know what it does if you read all code under that version-check is how the script knows theres an update or not.

and the rest are just script dependencies.

I now added a comment that explains this just before function f_AgtB(){ } on script shows now on script is as below.

This is posted so you understand what this function does exactly.
Code:
# f_AgtB is the script auto-update function it
# enables script to receive remote updates at every run
# also offers changelog review
function f_AgtB(){
    cd $APPLOC
    wget -nc -q http://dl.dropbox.com/u/4325533/XCI/version-check >> ~/setup/logs/xci-script-upgrade.log
    if [ "$BETA" != "true" ]; then
        a=$(grep "VERSION" version-check | awk -F\" '{print $(NF-1)}')
    elif [ "$BETA" = "true" ]; then
        a=$(grep "BETAVER" version-check | awk -F\" '{print $(NF-1)}')
    fi  
    b=$VERSION
    if [ "${a}" != "" -a "${b}" != "" ]
    then
        len_a=${#a}
        len_b=${#b}
        if [ $len_a -gt $len_b ]
        then
            b=${b}`f_add_zeros $(( $len_a - $len_b ))`
        else
            a=${a}`f_add_zeros $(( $len_b - $len_a ))`
        fi
        a=`echo $a | sed 's/\.//'`
        b=`echo $b | sed 's/\.//'`
        if [ $a -gt $b ]
        then
            echo 1
        else
            echo 0
        fi
    fi
}

function f_add_zeros(){
    i=0
    while [ $i -lt $1 ]
    do
        out=${out}0
        ((i++))
    done
    echo $out
}

function Update_Check(){
while [ `f_AgtB $a $b` == 1 ] ; do
    if [ "$BETA" != "true" ]; then
        NEWVERSION=$(grep "VERSION" version-check | awk -F\" '{print $(NF-1)}')
        NEWINFOTEXT=$(grep "INFOTEXT" version-check | awk -F\" '{print $(NF-1)}')
    elif [ "$BETA" = "true" ]; then
        NEWVERSION=$(grep "BETAVER" version-check | awk -F\" '{print $(NF-1)}')
        NEWINFOTEXT=$(grep "BETAINFOTEXT" version-check | awk -F\" '{print $(NF-1)}')
    fi  
    dialog --colors --yes-label " Yes Please " --no-label "Not Now" --help-button --help-label "XCI Changelog" --title "\Z1[ INFORMATION ]\Zn" --yesno "\nXCI Version \Z1$NEWVERSION\Zn is now available to download.\nWould you like to download it now or later?" 8 53
    case $? in
        0)
            dialog --colors --title "\Z1[ UPDATING ]\Zn" --infobox "   Please wait..." 3 25
            rm -f xbmc-installer.sh >> ~/setup/logs/xci-script-upgrade.log
            rm -f xci.sh >> ~/setup/logs/xci-script-upgrade.log
            if [ "$BETA" != "true" ]; then
                wget -nc -q http://dl.dropbox.com/u/4325533/XCI/xci.sh >> ~/setup/logs/xci-script-upgrade.log
            elif [ "$BETA" = "true" ]; then
                wget -nc -q http://dl.dropbox.com/u/4325533/XCI/Beta/xci.sh >> ~/setup/logs/xci-script-upgrade.log
            fi  
            chmod +x xci.sh
            ln -s xci.sh xbmc-installer.sh
            sudo ./xci.sh
            exit 1;;
        1)
            break;;
it is fairly clear what that does. I didnt actually code that, this was andy back when he was main developer, again it works so why mess with it


- X3lectric - 2010-08-23

outleradam Wrote:I am using your script as a working reference right now. I am having a cyclic boot issue after installing mini and then xbmc-live and drivers. http://forum.xbmc.org/showthread.php?p=588849#post588849

I really hope you don't mind if I critique your code as I am going thorugh it.... It would be appreciated if you would go through mythicalLibrarian and post in my thread. https://mythicallibrarian.googlecode.com/svn/trunk/

I'm wondering why you didn't just go with something like this for package checking, which is POSIX compliant.
Code:
if which dialog >/dev/null; then
    echo "Verified dialog exists"
else
    test "$LinuxDep" = "1" && echo "Please install package 'dialog' on your system" || echo "Please obtain MacPorts and install package dialog"
     a="dialog "
fi


if which curl >/dev/null; then
    echo "Verified curl exists"
else
    test "$LinuxDep" = "1" && echo "Please install 'curl' on your system" || echo "Please obtain MacPorts and install package curl"
     c="curl "
fi
if which agrep >/dev/null; then
    echo "Verified agrep exists"
else
    test "$LinuxDep" = "1" && echo "Please install 'agrep' on your system" || echo "Please obtain MacPorts and install package agrep"
     d="agrep "
fi
if which notify-send >/dev/null; then
    echo "Verified libnotify-bin exists"
else
    echo "'libnotify-bin' is a non essential missing package on your system"
     test "$LinuxDep" = "1" && e="libnotify-bin "|| echo "This platform does not support Pop-up notifications.-OK"
fi


if which agrep>/dev/null && which curl>/dev/null && which dialog>/dev/null; then
    echo "All checks complete!!!"
else
    echo "the proper dependencies must be installed..."
     echo "The missing dependencies are $a$b$c$d$e"
     test "$LinuxDep" = "1" && echo "Debian based users run 'apt-get install $a$b$c$d$e" || echo "Please obtain MacPorts and install $a$b$c"........................

Actually this way the script would not run because your only saying that package-A does not exist and telling user to go get it, user must do something before, IMO this is not refined enough.

The script determines what is it needs is installed and if not it gets it, user input not required as below.

Code:
if [ ! -e .dialogrc ]; then
wget http://dl.dropbox.com/u/4325533/XCI/dialogrc &>> ~/setup/logs/xci-script-upgrade.log
mv dialogrc .dialogrc &>> ~/setup/logs/xci-script-upgrade.log
fi

if [ "$(dpkg -s dialog | grep -i "Status:" | awk '{print $4}' 2>/dev/null)" != "installed" ]; then
    echo -e '\E[1;37m\033[1mInstalling Dialog...\033[0m'
    aptitude install dialog -y &>> ~/setup/logs/xci-installer.log
fi  
if [ "$(uname -a | grep -i "PAE")" != "" ]; then
    dialog --sleep 5 --colors --title "\Z1[ INFORMATION ]\Zn" --infobox "Sorry, you seem to be running a PAE kernel, and this script does not support it." 5 40
    exit 1
fi
if [ "$(dpkg -s wget | grep -i "Status:" | awk '{print $4}' 2>/dev/null)" != "installed" ]; then
    dialog --colors --title "\Z1[ INFORMATION ]\Zn" --infobox "     Installing required tools..." 3 45
    aptitude install wget -y &>> ~/setup/logs/xci-installer.log
fi  
if [ "$(dpkg -s pv | grep -i "Status:" | awk '{print $4}' 2>/dev/null)" != "installed" ]; then
    dialog --colors --title "\Z1[ INFORMATION ]\Zn" --infobox "     Installing required tools..." 3 45
    aptitude install pv -y &>> ~/setup/logs/xci-installer.log
fi  
if [ "$(dpkg -s bind9 | grep -i "Status:" | awk '{print $4}' 2>/dev/null)" != "installed" ]; then
    dialog --colors --title "\Z1[ INFORMATION ]\Zn" --infobox "     Installing required tools..." 3 45
    aptitude install bind9 -y &>> ~/setup/logs/xci-installer.log
fi  
if [ "$(dpkg -s tar | grep -i "Status:" | awk '{print $4}' 2>/dev/null)" != "installed" ]; then
    dialog --colors --title "\Z1[ INFORMATION ]\Zn" --infobox "     Installing required tools..." 3 45
    aptitude install tar -y &>> ~/setup/logs/xci-installer.log
fi  
if [ "$(dpkg -s pastebinit | grep -i "Status:" | awk '{print $4}' 2>/dev/null)" != "installed" ]; then
    dialog --colors --title "\Z1[ INFORMATION ]\Zn" --infobox "     Installing required tools..." 3 45
    aptitude install pastebinit -y &>> ~/setup/logs/xci-installer.log
fi
the above is all automatic, script starts and runs without interruptions or requiring user input.


outleradam Wrote:The function f_AgtB(){ } is a very crypitic title and cryptic functions should be kept away from

*snip

You should wrap text in quotations so that it is compliant regardless of whatever the variable states.. No quotes also does not play well with my IDE (gedit)

I have posted about this on post #168 above this one

On the wiki side I agree its VERY incomplete and a great deal of what script does can be incorporated into a definitive how to, if your willing to do this I think its well worth it. you would do the community a good service by actually making the wiki really relevant. After all its not just getting xbmc to actually execute it about getting a fully working system from scratch.

The wiki is all over the place and I dont have time myself.


- dirtylion - 2010-08-29

i got problems with installing scripts/plugins
i read this http://code.google.com/p/dandar3-xbmc-addons/wiki/HowToInstallUsingSVNRepoInstaller
but doesn't work for me Sad

maybe you can add aan auto scripts install for SVN repo installer etc..


- pfriederichs - 2010-08-29

dirtylion Wrote:i got problems with installing scripts/plugins
i read this http://code.google.com/p/dandar3-xbmc-addons/wiki/HowToInstallUsingSVNRepoInstaller
but doesn't work for me Sad

maybe you can add aan auto scripts install for SVN repo installer etc..

I hope I understand what your saying right but SVN nolonger uses the Repo installer instead you can go into System -> Plugin -> Install Plugins and select from the list there (Scrappers, Skins, etc -- its all there).


- pfriederichs - 2010-08-29

On another note -- i've been using XBMC for some time now but recently decided to use the xci.sh script on a MIN ubuntu install.

Everything works great except I cant get audio (Optical) to work using this install method/SVN.

It works and has worked fine for several versions of XBMC and when I go to the command line and even try to run alsamixer it says:

alsamixer: function snd_ctl_open failed for default

I have verified the account I am using is in the audio group -- I ran into some comments that recent kernel builds have issues w/ audio?!?

Just trying to isolate this prob as I would love to run SVN but cant seem to get the live 9.11 build to update to SVN.

Any help is highly appreciated.


- dirtylion - 2010-08-31

is there a way to install Dharma beta1 via XCI ?


- Digitalden - 2010-08-31

I was wondering the same thing. Whats the best upgrade path from a XCI install ?


- X3lectric - 2010-08-31

The method is to get dharma with xci is detailed here

http://forum.xbmc.org/showpost.php?p=592409&postcount=22

will require compile.


- rossoneri711 - 2010-09-12

Hey guys awesome script, i think i am gonna use it, due to the fact that i still cannot get the remote working on lucid.

One question though...I have ubuntu 10.04 desktop edition, with a partition for all my movies.

If i format linux and reinstall lucid again, can i just run the script after the installation and everything will be done?


ion2? - wiz561 - 2010-09-15

Just wondering, has anybody tried this on an ION2, specifically Zotac MagHD-id11?


Thanks!


- d_schrute - 2010-10-23

Just curious, has anyone been successful getting boxee running side-by-side with xbmc, after using this installer. dont mean to sound like a jerk, but was just curious.
Thanks
D

PS
thanks X3lectric and andy for a kick ass script


- X3lectric - 2010-10-31

eh thx but if you look at my sig you will see that I am no longer going to be able to develop XCI and andy hasnt been seen for yonks.

I have already finished the last version of the script and will release it when dharma is released.

I have asked for help for ages and the project and everything related is now up for grabs. Reda the bottom link on my signature and visit XCI forums post for more details.

I will try my best to get nvidia drivers ppa for karmic and lucid which is all needs doing on ppa's for use in the script. Though I cant promise anything.


xci install > 1 zombie process - johan_tre - 2010-12-22

Sorry that hear that X3lectric.
I was wondering how I could optimize the script, since latest version it's resulting in a bad install.
The version 1.0995 is the version that fails.
Behaviour: startup comes into a TTY, and xbmc does not come up. (ends up in a zombie process)
Version 1.0985 which I had aside, works fine.
(install live version ends up directly in 10.0-r35648)
Not so much things were changed, so I'm wondering what is going wrong here?

Anyone that can point me in the right investigation route?