XBMC-Live Install script. For Minimal Unbuntu Install
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=5...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.


Messages In This Thread
[No subject] - by Marvel - 2010-02-07, 02:32
[No subject] - by andyblac - 2010-02-07, 17:24
[No subject] - by flxfxp - 2010-02-07, 23:20
[No subject] - by andyblac - 2010-02-08, 12:22
[No subject] - by andyblac - 2010-02-08, 15:17
[No subject] - by X3lectric - 2010-02-08, 16:32
[No subject] - by jonn - 2010-02-08, 17:29
[No subject] - by rossoneri711 - 2010-02-08, 19:57
[No subject] - by X3lectric - 2010-02-08, 20:37
[No subject] - by coupas - 2010-02-08, 22:54
[No subject] - by X3lectric - 2010-02-08, 23:02
[No subject] - by jonn - 2010-02-09, 02:05
[No subject] - by coupas - 2010-02-09, 02:22
[No subject] - by andyblac - 2010-02-09, 02:42
[No subject] - by coupas - 2010-02-09, 02:47
[No subject] - by andyblac - 2010-02-09, 02:57
[No subject] - by andyblac - 2010-02-09, 03:06
[No subject] - by coupas - 2010-02-09, 03:10
[No subject] - by coupas - 2010-02-09, 03:41
[No subject] - by X3lectric - 2010-02-09, 10:42
[No subject] - by X3lectric - 2010-02-09, 14:33
[No subject] - by jonn - 2010-02-10, 02:25
[No subject] - by Phantisy - 2010-03-17, 15:25
[No subject] - by Txori82 - 2010-03-17, 16:54
[No subject] - by FireMan - 2010-03-17, 18:13
[No subject] - by DanielEis - 2010-03-17, 20:25
[No subject] - by X3lectric - 2010-03-18, 02:43
[No subject] - by Furner - 2010-03-18, 23:28
[No subject] - by FishOil - 2010-03-19, 20:42
[No subject] - by FishOil - 2010-03-19, 20:55
[No subject] - by andyblac - 2010-03-19, 21:46
[No subject] - by andyblac - 2010-03-19, 21:47
[No subject] - by FishOil - 2010-03-19, 21:49
[No subject] - by andyblac - 2010-03-19, 21:51
[No subject] - by FishOil - 2010-03-19, 22:11
[No subject] - by TheShortOfIt - 2010-03-19, 22:39
[No subject] - by Furner - 2010-03-20, 00:09
[No subject] - by FishOil - 2010-03-20, 00:38
[No subject] - by Tyler Durden - 2010-03-20, 14:07
[No subject] - by X3lectric - 2010-03-20, 16:55
[No subject] - by Tyler Durden - 2010-03-20, 17:22
[No subject] - by X3lectric - 2010-03-20, 18:09
[No subject] - by andyblac - 2010-03-20, 20:01
[No subject] - by Tyler Durden - 2010-03-20, 20:06
[No subject] - by Tyler Durden - 2010-03-20, 20:20
[No subject] - by Tyler Durden - 2010-03-20, 22:52
[No subject] - by TheShortOfIt - 2010-03-21, 18:50
[No subject] - by andyblac - 2010-03-21, 20:22
ubuntu 10.04 beta1 - by toby77jo - 2010-03-25, 13:22
[No subject] - by ppic - 2010-03-26, 04:08
How to get the Beta 1.09 ? - by ahrensfd - 2010-03-26, 20:19
[No subject] - by Zapata - 2010-03-29, 18:42
[No subject] - by tredman - 2010-03-30, 21:37
[No subject] - by The-Boxhead - 2010-03-31, 01:40
[No subject] - by adave - 2010-03-31, 05:28
[No subject] - by FireMan - 2010-04-01, 18:43
[No subject] - by The-Boxhead - 2010-04-01, 21:13
[No subject] - by adave - 2010-04-01, 22:17
[No subject] - by ppic - 2010-04-01, 23:24
[No subject] - by ClayM - 2010-04-02, 02:54
[No subject] - by FireMan - 2010-04-04, 16:05
[No subject] - by hoozel - 2010-04-06, 16:09
mce remote issue - by jarthur911 - 2010-04-06, 18:20
[No subject] - by splnuts - 2010-04-09, 13:11
[No subject] - by Ticko - 2010-04-10, 00:03
[No subject] - by toby77jo - 2010-04-12, 11:16
Problem - by tkainusa - 2010-04-12, 14:36
[No subject] - by d3CoY - 2010-04-16, 07:09
[No subject] - by jgs2n - 2010-04-16, 17:46
[No subject] - by idlehands - 2010-04-17, 18:05
[No subject] - by adave - 2010-04-17, 18:08
[No subject] - by rickx - 2010-04-17, 18:33
What am i doing wrong? - by archmage4ever - 2010-04-17, 23:35
[No subject] - by FireMan - 2010-04-18, 00:17
[No subject] - by archmage4ever - 2010-04-18, 01:02
Asrock remote - by skatboy - 2010-04-30, 13:17
[No subject] - by FireMan - 2010-04-30, 16:43
[No subject] - by ClayM - 2010-04-30, 23:11
[No subject] - by scales - 2010-05-02, 19:06
[No subject] - by g0pkh - 2010-05-04, 16:53
[No subject] - by JoeSchmo - 2010-05-05, 11:20
[No subject] - by g0pkh - 2010-05-05, 14:16
[No subject] - by noikz - 2010-05-05, 15:30
[No subject] - by ClayM - 2010-05-07, 18:55
[No subject] - by ppic - 2010-05-07, 19:58
[No subject] - by circle_ - 2010-05-14, 06:47
[No subject] - by ClayM - 2010-05-14, 14:50
[No subject] - by teeedubb - 2010-05-29, 04:55
[No subject] - by teeedubb - 2010-05-29, 05:12
[No subject] - by ClayM - 2010-05-29, 06:45
[No subject] - by teeedubb - 2010-05-29, 08:32
[No subject] - by Digitalden - 2010-06-04, 01:55
[No subject] - by TORGULL - 2010-06-19, 11:29
hdmi and optical audio - by therealwakka - 2010-07-09, 16:31
[No subject] - by pletopia - 2010-07-13, 06:11
[No subject] - by pletopia - 2010-07-13, 06:23
[No subject] - by FireMan - 2010-07-13, 15:32
[No subject] - by pletopia - 2010-07-13, 16:03
[No subject] - by pletopia - 2010-07-14, 05:36
[No subject] - by wuerfelkater - 2010-07-14, 06:31
[No subject] - by FireMan - 2010-07-14, 14:45
[No subject] - by X3lectric - 2010-07-15, 15:50
[No subject] - by FireMan - 2010-07-15, 16:08
XCI 1.0960 beta released - by X3lectric - 2010-07-15, 16:24
[No subject] - by ppic - 2010-07-15, 16:59
[No subject] - by therealwakka - 2010-07-15, 20:13
[No subject] - by FireMan - 2010-07-15, 20:21
[No subject] - by X3lectric - 2010-07-16, 00:00
[No subject] - by FireMan - 2010-07-16, 02:55
[No subject] - by X3lectric - 2010-07-16, 07:57
[No subject] - by nitr8 - 2010-07-16, 10:39
[No subject] - by burritoboy9984 - 2010-07-16, 19:58
[No subject] - by X3lectric - 2010-07-17, 18:19
[No subject] - by phire - 2010-07-18, 02:46
[No subject] - by sb206 - 2010-07-19, 14:43
[No subject] - by pletopia - 2010-07-19, 17:09
[No subject] - by X3lectric - 2010-07-24, 11:00
[No subject] - by FireMan - 2010-07-29, 22:06
[No subject] - by X3lectric - 2010-07-30, 00:34
[No subject] - by DejaVu - 2010-08-09, 04:44
[No subject] - by dirtylion - 2010-08-13, 15:23
[No subject] - by X3lectric - 2010-08-13, 17:49
[No subject] - by Xeijin - 2010-08-13, 23:49
[No subject] - by X3lectric - 2010-08-14, 00:50
[No subject] - by Xeijin - 2010-08-14, 11:33
[No subject] - by X3lectric - 2010-08-14, 12:05
[No subject] - by Xeijin - 2010-08-15, 01:31
[No subject] - by jok3r - 2010-08-15, 05:50
[No subject] - by Xeijin - 2010-08-15, 14:57
[No subject] - by X3lectric - 2010-08-15, 22:16
[No subject] - by Tbtf - 2010-08-16, 03:25
ps3 bd remote with xci - by josephdyland - 2010-08-16, 05:25
[No subject] - by pletopia - 2010-08-17, 05:34
[No subject] - by X3lectric - 2010-08-17, 11:42
[No subject] - by dirtylion - 2010-08-17, 13:55
[No subject] - by X3lectric - 2010-08-17, 14:01
[No subject] - by dirtylion - 2010-08-17, 15:56
[No subject] - by X3lectric - 2010-08-17, 16:19
[No subject] - by dirtylion - 2010-08-17, 17:03
[No subject] - by tredman - 2010-08-17, 17:07
[No subject] - by dirtylion - 2010-08-17, 17:13
[No subject] - by X3lectric - 2010-08-17, 17:34
[No subject] - by dirtylion - 2010-08-17, 17:54
[No subject] - by X3lectric - 2010-08-17, 18:09
[No subject] - by dirtylion - 2010-08-17, 18:33
[No subject] - by X3lectric - 2010-08-17, 18:42
[No subject] - by dirtylion - 2010-08-17, 19:09
[No subject] - by X3lectric - 2010-08-17, 19:19
[No subject] - by pletopia - 2010-08-17, 19:40
[No subject] - by dirtylion - 2010-08-17, 19:42
[No subject] - by X3lectric - 2010-08-17, 19:45
[No subject] - by pletopia - 2010-08-17, 21:15
[No subject] - by X3lectric - 2010-08-18, 00:46
[No subject] - by Xeijin - 2010-08-18, 01:30
[No subject] - by blackrice - 2010-08-18, 03:08
[No subject] - by X3lectric - 2010-08-18, 10:29
[No subject] - by bsmim - 2010-08-19, 18:01
[No subject] - by X3lectric - 2010-08-19, 22:09
multichannel - by User 43642 - 2010-08-21, 04:55
[No subject] - by outleradam - 2010-08-21, 05:15
[No subject] - by X3lectric - 2010-08-21, 13:10
[No subject] - by outleradam - 2010-08-21, 13:55
[No subject] - by X3lectric - 2010-08-21, 15:46
[No subject] - by outleradam - 2010-08-21, 16:21
[No subject] - by X3lectric - 2010-08-21, 22:37
[No subject] - by X3lectric - 2010-08-23, 15:52
[No subject] - by dirtylion - 2010-08-29, 18:31
[No subject] - by pfriederichs - 2010-08-29, 20:16
[No subject] - by pfriederichs - 2010-08-29, 20:20
[No subject] - by dirtylion - 2010-08-31, 13:43
[No subject] - by Digitalden - 2010-08-31, 21:17
[No subject] - by X3lectric - 2010-08-31, 23:56
[No subject] - by rossoneri711 - 2010-09-12, 19:49
ion2? - by wiz561 - 2010-09-15, 00:45
[No subject] - by d_schrute - 2010-10-23, 08:38
[No subject] - by X3lectric - 2010-10-31, 04:52
xci install > 1 zombie process - by johan_tre - 2010-12-22, 23:46
[No subject] - by X3lectric - 2010-12-23, 01:34
[No subject] - by ksosez - 2010-12-23, 20:18
[No subject] - by X3lectric - 2010-12-24, 08:39
[No subject] - by johan_tre - 2010-12-28, 17:28
[No subject] - by johan_tre - 2010-12-28, 17:56
[No subject] - by freestyler3000 - 2011-01-03, 14:34
[No subject] - by X3lectric - 2011-01-03, 15:32
[No subject] - by X3lectric - 2011-01-03, 16:07
happy new year - by johan_tre - 2011-01-03, 20:33
[No subject] - by vikjon0 - 2011-01-03, 20:48
[No subject] - by johan_tre - 2011-01-03, 22:56
[No subject] - by X3lectric - 2011-01-03, 23:55
[No subject] - by johan_tre - 2011-01-04, 02:26
[No subject] - by X3lectric - 2011-01-04, 21:28
[No subject] - by johan_tre - 2011-01-04, 23:26
[No subject] - by X3lectric - 2011-01-05, 01:53
[No subject] - by johan_tre - 2011-01-05, 18:58
[No subject] - by X3lectric - 2011-01-06, 01:09
[No subject] - by johan_tre - 2011-01-06, 08:26
[No subject] - by X3lectric - 2011-01-06, 09:32
Logout Mark Read Team Forum Stats Members Help
XBMC-Live Install script. For Minimal Unbuntu Install0