LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-21-2011, 09:07 AM   #1
disco_slack
Member
 
Registered: Apr 2011
Posts: 44

Rep: Reputation: 1
Upgrading to Alien's latest KDE 4.7. Could this script work?


Hi there,

As I am pretty lazy to upgrade KDE in my system, I though this script could work on my 32 bit computer. I am thinking to make a bash script, called kdeU.sh with this content:
Code:
rsync -av rsync://alien.slackbook.org/alien/ktown/4.7.0 . && cd 4.7.0 &&
upgradepkg --reinstall --install-new x86/deps/*.t?z
 && upgradepkg --reinstall --install-new x86/kde/*.t?z && removepkg polkit-kde-1
&& removepkg kdebase-runtime && removepkg kdebase-workspace && removepkg
kdebindings && removepkg kdeedu && removepkg konq-plugins
I would run it after running
Code:
init 3
. Will it work?

Thanks
 
Old 08-21-2011, 06:34 PM   #2
GreenTuxer
LQ Newbie
 
Registered: Aug 2011
Location: Odivelas, Portugal
Distribution: Slackware
Posts: 4

Rep: Reputation: Disabled
You don't need to use all those &&. If you write the script in an executable file, you can write each command in it's own line. You can even capture the exit code of the command above and, depending on being 0 or not, continue script or exit with error.
 
Old 08-22-2011, 02:56 AM   #3
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Rep: Reputation: 90
I would avoid hard coding the version number. It will not work when it gets updated to 4.7.1 for example.
 
Old 08-22-2011, 09:23 AM   #4
specialized
Member
 
Registered: Sep 2005
Location: Mar del Plata, Arg
Distribution: Always Slackware
Posts: 228

Rep: Reputation: 37
to change the version use something like this:
(use variables)

echo Kde version?
read VERSION
rsync -av rsync://alien.slackbook.org/alien-kde/$VERSION/x86_64/ .

and check if the script runs as root
with something like

[ -x /bin/id ] && CMD_ID="/bin/id" || CMD_ID="/usr/bin/id"
if [ "$($CMD_ID -u)" != "0" ]; then
echo "need to be root dude"
exit 1
fi

i hope this helps, works for me
cheers
 
Old 08-22-2011, 10:27 AM   #5
slackass
Member
 
Registered: Apr 2006
Location: SE Texas
Distribution: Slack64-15.0
Posts: 910

Rep: Reputation: 90
I use this to upgrade kde from my local mirror.
However I'm open to all constructive criticism and guidance.

#!/bin/sh
cd /media/sdb1/RSYNC_STUFF/Alien-KDE/4.7.0/x86_64/deps
upgradepkg --reinstall --install-new *.t?z
cd /media/sdb1/RSYNC_STUFF/Alien-KDE/4.7.0/x86_64/kde
upgradepkg --reinstall --install-new *.t?z
removepkg polkit-kde-1
removepkg kdebase-runtime
removepkg kdebase-workspace
removepkg kdebindings
removepkg kdeedu
removepkg konq-plugins
shutdown -r now


edit:
I run this from init 3

Last edited by slackass; 08-22-2011 at 10:38 AM.
 
Old 08-22-2011, 04:36 PM   #6
disco_slack
Member
 
Registered: Apr 2011
Posts: 44

Original Poster
Rep: Reputation: 1
so guys, can we make a "lazy" way to upgrade to latest KDE packages from Alien Bob? Could some good soul make a script that we can run from init 3?

Thanks in advance
 
Old 08-22-2011, 07:56 PM   #7
slackass
Member
 
Registered: Apr 2006
Location: SE Texas
Distribution: Slack64-15.0
Posts: 910

Rep: Reputation: 90
#!/bin/sh
slackpkg update
slackpkg install-new
slackpkg upgrade-all
mkdir /tmp/kde
rsync -r -a -v --bwlimit=100 --delete --progress --stats --exclude 'source' --exclude 'x86' --exclude 'kdei' rsync://alien.slackbook.org/alien/ktown/4.7.0/ /tmp/kde/
cd /tmp/kde/x86_64/deps/
upgradepkg --reinstall --install-new *.t?z
cd /tmp/kde/x86_64/kde/
upgradepkg --reinstall --install-new *.t?z
removepkg polkit-kde-1
removepkg kdebase-runtime
removepkg kdebase-workspace
removepkg kdebindings
removepkg kdeedu
removepkg konq-plugins
shutdown -r now

Make this script and name it instkde and put it in /tmp
then issue
cd /tmp
chmod +x instkde <---as root

Commands:
ctrl alt f6 (if your using init 4)
login as root
telinit 3
cd /tmp
sh instkde

This worked for me but keep in mind that I’m just learning this stuff and as always I'm open to all constructive criticism and guidance..

Blacklist:
1alien
2alien
5alien
kdebase-runtime
kdebase-runtime
kdebase-workspace
kdebindings
kdeedu
konq-plugins

edit:
I should have mentioned this is for 64 bit.

Last edited by slackass; 08-22-2011 at 10:03 PM.
 
Old 08-25-2011, 04:24 AM   #8
disco_slack
Member
 
Registered: Apr 2011
Posts: 44

Original Poster
Rep: Reputation: 1
@slackass

I modified your script for my X86 system and it worked for me. It would be great to make a slack-current iso with latest KDE from Alien.
 
Old 08-25-2011, 03:34 PM   #9
slackass
Member
 
Registered: Apr 2006
Location: SE Texas
Distribution: Slack64-15.0
Posts: 910

Rep: Reputation: 90
Quote:
Originally Posted by disco_slack View Post
@slackass

I modified your script for my X86 system and it worked for me. It would be great to make a slack-current iso with latest KDE from Alien.
Glad it helped you. But bear in mind that I'm still just a learner so this script could be made better by my betters.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Alien's Slackware Mirror Script mlangdn Slackware 2 01-11-2011 11:52 AM
Alien's KDE 4.5.3 packages SavoTU Slackware 7 11-17-2010 03:45 AM
how to Install kde 4.5 from alien's zrdc28 Slackware 43 09-08-2010 10:26 PM
KDE 4.4.0 on Alien Bob's site samac Slackware 64 04-20-2010 07:22 AM
upgrading kde 3.2 with latest kde for SLES9 micro_xii SUSE / openSUSE 1 12-04-2006 05:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration