My auru script to show all available updates with versions and install

So, I decided to hack together a little script that might be useful to someone else too.  I wanted to script that would show me all available updates, from from the official repos as well as from the aur.  I also wanted to see at a glance what the installed versions of each package and the new version to be installed are. 
The output looks something like this:
[shaun@shaun-asus-x202e ~]$ auru
Available updates from core:
vlc 2.1.2-2 2.1.2-3
Available updates from AUR:
ansible 1.4.3-1 1.4.4-1
Would you like to install all updates without further prompting?
y/n->
Here's the code that I put into a dropbox shared file called arch_functions and source it from ~/.bashrc.   Replace the test_apacman function and associated commands with aur wrapper of choice.  Once this is in place, I simply run auru once a day on all my machines and I get all the information I need, and only press a y or n in order install all updates. 
bold="\033[1m"
endbold="\033[0m"
test_apacman() {
hash apacman 2>/dev/null || \
#packer -S apacman --noedit --noconfirm
#sudo pacman -S --needed --noconfirm base-devel jshon git curl
hash wget 2>/dev/null || sudo pacman -S --needed --noconfirm wget
origdir=$(pwd)
cd ${HOME}
mkdir -p ./tmpaur/
cd ./tmpaur/
wget https://aur.archlinux.org/packages/ap/apacman/apacman.tar.gz
tar xfv apacman*
cd apacman
makepkg
sudo pacman -U --needed --noconfirm apacman-*.pkg.tar.xz
cd "$origdir"
auru() {
updatesavail=0
## check that dependencies are installed
# expac
hash expac || sudo pacman -S --needed --noconfirm expac
# apacman
test_apacman
### check core updates
pacman -Syy
echo -en "${bold}Available updates from core:${endbold}\n"
pacmanupdates=$(sudo pacman -Qu)
for pacmanupdate in "$pacmanupdates"
do
if [ "$pacmanupdate" == "" ]
then
echo "No core updates"
else
pkg=$(echo "$pacmanupdate" | awk '{print $1}')
pkgvernow=$(echo "$pacmanupdate" | awk '{print $2}')
pkgveravail=$(sudo pacman -Si ${pkg} | grep Version | awk '{print $3}')
#echo -en "$pkg\t$pkgvernow\t$pkgveravail\n"
printf '%-25s' "$pkg"
printf '%-20s' "$pkgvernow"
printf '%-20s\n' "$pkgveravail"
updatesavail=$((updatesavail + 1))
fi
done
### check aur updates
echo -en "${bold}Available updates from AUR:${endbold}\n"
aurupdates=$(apacman --auronly --quickcheck)
for aurupdate in "$aurupdates"
do
if [ "$aurupdate" == "" ]
then
echo "No AUR updates"
else
pkg="$aurupdate"
pkgvernow=$(sudo pacman -Q ${pkg} | awk '{print $2}')
pkgveravail=$(apacman -Ss ${pkg} | grep "aur/${pkg} " | awk '{print $2}')
printf '%-25s' "$pkg"
printf '%-20s' "$pkgvernow"
printf '%-20s\n' "$pkgveravail"
updatesavail=$((updatesavail + 1))
fi
done
### apply updates if any
if [ $updatesavail -gt 0 ]
then
echo "Would you like to install all updates without further prompting?"
read -p "y/n->" answer
if [ "$answer" == "y" ]
then
sudo pacman -Su --noconfirm
apacman -Su --auronly --noedit --noconfirm --needed
fi
fi
Last edited by senorsmile (2014-01-20 04:41:14)

For someone with a username like yours I would have expected better. I guess you are not a "tech guy" at all. After a while Apple improves the hardware, and updates iOS to take advantage of the features and speed of the newer hardware. Older devices are simply incapable of taking advantage of the newer features, because the hardware doesn't support it. There's a lot of advice posted in the forum from people who warn that you shouldn't upgrade an iPhone 4S to iOS 8, because it kills the performance. If that's true, imagine how iOS 8 must perform on an iPhone 4. 
By your reasoning I should be able to run Windows 10 on a 1985 IBM PC. The only reason you can't is because Microsoft had a deal with hardware manufacturers to force people to get new computers.
Or are you arguing that Apple should never improve hardware, because it will leave users of older phones in the lurch?

Similar Messages

  • With all the updates with Firefox and Yahoo, My Yahoo homepage no longer works or functions at all. It doe's work on Safari. When I click on anything on My homepage all I get is a message" sorry bad request".

    I also often have to do a forced quit as firefox freezes up. I did not have these problems until I tryed to upgrade to firefox4. for Mac.
    I tryed re-enstalling 3.5 but ended up with 5 which was worse. It appears that Firefox and Yahoo are no longer compatible.

    I know you can't help with my Yahoo problem, however, apparently at some time in the past I have went to the Sync and tried to figure it out on both my laptop and my desktop, because I have the long snyc key information. However, when I go to try to sync both computers I never get the box to enter that key on either one. That is my problem. So should I try and get a new sync key and see if that works.

  • Applescript for iTunes: "show all available episodes"?

    I use the script "Update Expired Podcasts" from Doug's iTunes Scripts (http://dougscripts.com/423).
    In order to circumvent a bug (IMHO) in iTunes, I would like to do "show all available episodes" (in the right-click menu) for each of the podcasts in the list, before actually downloading the latest episode.
    Could some kind person please explain to me what the correct applescript command for that would be?
    I have already searched the net, and I have also searched the dictionary in Applescript Editor, to no avail.
    Regards,
    Gabriel.

    Apparently this still isn't a thing? Figured I'd ask again for myself and the 19 other people who also have this question.

  • Itunes 10.1.1 will not show all podcast updates via Refresh function

    I am having a problem with my podcast not refreshing on the itunes podcast page when a publish a new episode. If I use the "show all available episodes" function the episode appears but if I click refresh or the automatic update functions the podcast is not new seen.
    This is only a problem with itunes 10.1.1 on OS X 10.6.5, the refresh function operates on my windows machine using the latest itunes version. I am awaiting a response from Libsyn where my podcasts are based but I was wandering if anyone is having any similar problems.
    Once the podcast is selected as previously mentioned, download and play is normal

    Thank you but alas the Store's check available downloads facility does not work for podcasts.
    This problem has only appeared since the last itunes update to my knowledge. It may well be an rss related issue as it does not seem to effect other podcast's new episodes, though I cannot see why it should only be a problem on my Mac...and all subscribe settings are constant for all podcast issuers on both platforms...It might just be a hidden setting somewhere but I've tried everything

  • HT5022 I'm trying to add a "new client" to my wireless network using Airport Utility, but I can't find that option in the new version.  I've downloaded all available updates of the OS and the utility..  Help!

    I'm trying to add my HP wireless printer as a "new client" to my wireless network using Airport Utility, but I can't find that option in the new version.  I've downloaded all available updates of the OS and the utility..  Help!

    Why would you need to ADD a new Client. Unless the APE sytem is completely different then any other Wireless router the printer should get an IP address from the router. That is IF the printer is setup to get an IP from the LAN DHCP server.
    Now you may want to make that IP it does get a Staticly assign IP address so it never changes, which will screw up printing if it does change. But i don't know if you can do that with APE routers.

  • I can't open NEF files with PS Elements9 (Mac) and have just performed all avail. updates

    I can't open NEF files with PS Elements9 (Mac) and have just performed all avail. updates.  What to do?

    Many thanks!!!  This works and is probably the best fix for now.  Thank you!!!
    Date: Wed, 30 Jan 2013 10:58:01 -0800
    From: [email protected]
    To: [email protected]
    Subject: I can't open NEF files with PS Elements9 (Mac) and have just performed all avail. updates
        Re: I can't open NEF files with PS Elements9 (Mac) and have just performed all avail. updates
        created by 99jon in Photoshop Elements - View the full discussion
    For the D600 NEF's you have two alternatives: (1) Upgrade to PSE 11. (2) Download and install the free Adobe DNG converter to convert your raw files to the Adobe universal Raw format and the files will open in all versions of PSE (keep your originals as backups and for use in the camera manufactures software)  Windows download click here DNG Converter 7.3  Mac download click here DNG Converter 7.3  You can convert a whole folder of raw images in one click. See this quick video tutorial: You Tube click here for DNG Converter tutorial
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5034913#5034913
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5034913#5034913
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5034913#5034913. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Photoshop Elements by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Show all available episodes of a subscribed podcast without downloading?

    I have the podcasts I am subscribed to set to automatically download any new episodes, and automatically delete them once they have been listened to/watched.  This works well enough, but when they are deleted, those particular episodes are no longer listed in the available episodes.  I know I can click "show all available episodes", but when I do that, they are automatically downloaded again.  iTunes apparently thinks they are new, and that I haven't listened to them yet.  Is there any way to maintain a current list of all available episodes in my subscribed podcasts?  There are older episodes (ones that haven't been downloaded since I have subscribed) still in the list, that iTunes apparently doesn't consider new, but any that have been downloaded and listened to since subscribing, are removed from the list when auto-deleted, and I can't get them back in the list without them being automatically downloaded again.  I hope this makes sense.  I tried to contact apple support, and the guy that replied had no idea what I was talking about.  I would appreciate any help.  Thanks a lot.

    I think you misunderstood my question.  What I want to do is have ALL available episodes in the list, even the ones that I have downloaded (automatically because I am subscribed), listened to, and deleted (also automatically because I have it set to delete played episodes).  I just want a complete list of episodes including the ones I have already heard, but those episodes, once auto-deleted, are no longer listed, and if I "show all available podcasts", they are downloaded again.

  • Replica servers showing all Approved updates as 'Unapproved'

     Hi WSUS Experts,
        In our environment we suffer very often from the following problem - donwstream servers after synchronization show all Approved updates from the upstream server (over 3100) as Unapproved. Hence the files are not on the downstream server.
    Do oyu have any clue on how to fix/approach this problem?

     Hi, yes of course - it is a Replica server :-)
    Sorry, had to ask! 
    Can you give some more insight into the versions involved?
    Are both upstream/downstream patched to same level?
    Also, is it just a single downstream?
    If there are others are they working?
    Did that downstream ever work correctly?
    Are there any firewalls in place?
    Any error messages in the Windows event logs?
     Any errors in softwaredistribution.log?
    Are clients receiving updates from the upstream server ok? 
    If you find the answer of assistance please "Vote as Helpful"and/or "Mark as Answer" where applicable. This helps others to find solutions for there issues, and recognises contributions made to the community :)

  • Why does "show all available episodes" fail to do that?

    I have been able to do this before but now, on all podcasts, 'Show all available episodes' displays nothing.
    What have I done wrong?

    I think you misunderstood my question.  What I want to do is have ALL available episodes in the list, even the ones that I have downloaded (automatically because I am subscribed), listened to, and deleted (also automatically because I have it set to delete played episodes).  I just want a complete list of episodes including the ones I have already heard, but those episodes, once auto-deleted, are no longer listed, and if I "show all available podcasts", they are downloaded again.

  • How do I fix Creative Cloud to show ALL my apps that I have installed ?

    Here my specs : Windows 7 Pro 64 bit ● 10GB DDR3 RAM ● Intel Core i7 ● AMD Radeon HD 5700 Series
    Here my story :
    One day, little Creative Cloud said it had an update to be installed on itself. Possibly taking it from version 1.7 to 2.0 or something. I clicked on update. Creative Cloud started downloading and once it was done it said update complete. I clicked on finish or something. Once that happened, it disappeared completely. Gone from taskbar, Window closed and shortcut gone ! I looked into the Creative Cloud folder, in the Adobe folder and there were two folders : Adobe Creative Cloud and Adobe Creative Cloud_2.7.0.413. I then went into the Adobe Creative Cloud folder and double opened the application therein. It opened the Creative Cloud desktop app BUT showed it had an update just as before for itself. I AGAIN clicked on update, and then it said "Error 50" , unable to update. I searched around and somewhere on the forums it said I must download adobe cloud and reinstall it. I did that and ever since that dreadful day, little Creative Cloud desktop app doesn't want to show ALL my installed apps anymore. It simply shows only 2 !
    This is what I have : Photoshop, Dreamweaver, Flash Professional, Media Encoder, Fireworks. What it only shows in Creative Cloud desktop app : Flash Professional, Dreamweaver.
    What I tried doing :
    1.) Re-installing the Adobe Creative Cloud desktop app.
    2.) Changing the directory settings for APPS and pointing them to the actual location of the installed apps.
    3.) Deleting or renaming the "opm.db" file.
    4.) YES, I RESTARTED MY PC !!!
    What I want to do :
    1.) Receive a fix that will make ALL my installed apps show.
    2.) Find out what the hell the difference is between the concept of having TWO versions of the same program installed BUT getting updates for BOTH like "Adobe Photoshop CC" and "Adobe Photoshop CC 2014". I installed the Adobe Photoshop CC this year almost 2 months ago for example. Then CC told me there is an app update and that got me Adobe Photoshop CC 2014. Now I have two versions of the above listed programs... Why doesn't CC just UPDATE the Adobe Photoshop CC, rename and list ONLY Adobe Photoshop CC 2014 in the end ?
    What I do not want : RE-DOWNLOAD OR RE-INSTALL ALL MY INSTALLED APPS ! This not only will cost me a lot of internet bandwidth but also a considerable amount of time. There must be a simple fix as all files are in place ! I can launch all apps individually and they are working both the "" versions and the 2014 ones.
    My question : How do I fix Creative Cloud to show ALL my apps that I have installed ?

    Hi alextz11,
    The email in the forum does not reflect any Creative Cloud order. Please follow the steps in
    Locate the C:\Program Files (x86)\Common Files\Adobe\OOBE directory and rename it to OOBE_OLD
    Download and reinstall the Creative Cloud Application from https://creative.adobe.com/products/creative-cloud.
    You can also consult : http://helpx.adobe.com/creative-cloud/help/install-apps.html
    Hope it helps your issue.
    Regards,
    Rajshree

  • I hv iPhone with ios 6.0.2 My iphone could not able to check for update-it's just showing "checking for updates" with loading sign How can I upgrade to ios 7?  Help pls

    I hv iPhone with ios 6.0.2
    My iphone could not able to check for update…it’s just showing “checking for updates” with loading sign
    How can I upgrade to ios 7?
    Help pls

    I agree- I apologize if I sounded skeptical and attacking. In no way did I mean it to sound that way.
    I completely agree on the software-hardware combo issue- this is why apple killed off 1G and 2G devices- because newer software revisions would never ever run well if at all on such ancient devices. can you imagine running iOS 6 on an iPhone/iPod touch 1G? That would be terrible. Let alone iOS 3 runs terrible on them and now are generally rendered useless due to newer App Store requirements (most require 4.3+ now to allow apple to kill off the older devices). forcing newer software on older hardware (apple, dell, HP,... Anything electronic this definitely applies to) will almost always yield less-than-par results. The other part is apple forcing you to upgrade by means of intentially making things obsolete. all companies do that.
    All of this factual info aside, the issue at hand with the 5 is not a software-hardware combo problem- those are most widely seen with the major revisions. then again, this isn't the first time apple has gotten caught up in battery drain snafus (even iOS 5 was plagued with this as well- and now there are some people desperate to roll back but can't). it basically waters it down to the point where keeping the stock software will always yield the best results even though newer versions provide better features- it all depends on whether or not the person deems the added features are worth a performance hit.
    PS. I'm still at 100%- and I've been using it periodically throughout the day. your combo worked for you, but didn't for me. And may or may not work for others- As the tech world would say, mileage may vary.
    PSS. What model/carrier do you have? Just wondering.

  • How to show all view tab (Main Report and all Sub Report) in Visual FoxPro 9

    I use ActiveX from Crystal Report Developer XI for viewer in Visual FoxPro 9 and I already know how to show Main Report by using command:
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=thisform.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    Inside the MyReport.rpt there is two subreport name :
    1. MySubReport1
    2. MySubReport2
    My Question is :
    How to show all view tab (Main Report and all Sub Report) at the 1st time we call ViewReport?
    I try to using command :
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=thisform.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptSub=oRptOpen.OpenSubreport("MySubReport1")
    oRptSub=oRptOpen.OpenSubreport("MySubReport2")
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    but only show Main Report (view tab name : Preview)?
    Did I miss any command before I call oRptView.ViewReport?

    Your right, there is only one tab to view the report.
    To open the subreports you will need to click on them in the main report. I don't know of a way to open them programmatically like you are doing here
    http://diamond.businessobjects.com/robhorne</a>

  • SSRS 2008: how to show an empty chart with legend and x and y axis when no data available

    Hi,
    I am using SSRS 2008, I generated one chart in report designer with the data from Analysis Services (Cube).
    According to the dataset, there is no data returned when I run the query. so when I preview the chart, there is nothing but "no data available" showing on the chart.
    Here I want to know is there any possible to show an empty chart with legend and x and y axis?
    If it is possible, can you tell me how can I make it?
    Best Regards.
    Connie Zhu

    Hi,
    When there is no data, the chart displays the message "no data available". But using a little work around, you can display an empty chart.
    Please find the below steps given to achieve this
    1. Create a new dataset using TSQL to return 1 row of data having the category field and value field set to 0. Add the fields that are necessary for the category fields, series fields and datafields.
       A simple example would be like
       SELECT 'abc' as Category, 0 as Amount
    2. Add a new chart, set the category field to 'Category' and set the data field to Amount from above dataset created in step 1.
    3. In the new chart, right click the category axis and select axis properties, Click on the labels tab, check on
    'Hide axis labels' and then click ok
    4. Now set the Visibility property of both the charts depending on the rows returned from your main dataset
       a. click on your main chart and set its Hidden property to :
    =iif(CountRows("MainDataSet"),false,true) 
       b. click on the new blank chart added and set its Hidden proprety to (the opposite) :
    =iif(CountRows("MainDataSet"),true,false) 
       Note : Please change the dataset name in above expression "MainDataset" to the name of your chart's dataset
    5. Resize the new chart to the same size as your main chart, then position the new chart on the place as the main chart.
       (Note : You can set the position of new chart to be same by copying the location property from the main chart) 
    6. Now run and observe the result. When there are no rows returned by your main dataset, the new chart (the blank chart) should be displayed.
    I've added a working sample of this kind of a report
    here.
    Hope this helps. Please feel free to discuss if you have any questions.
    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
    BH

  • HT4623 I downloaded update with itunes and now all I see is itunes logo and arrow to a plug

    I downloaded an update with itunes and now myiphone is black and only shows itunes logo with an arrow and plug.  no phone tried holding down on off still black  please help I need this phone

    http://support.apple.com/kb/ht1808

  • HT201274 i tried to erase all content and reset settings from the device option.it is taking too long and its been 15 hours but not yet done.its showing a skeleton sigh with buffering and sometimes flipping to apple sign.

    i tried to erase all content and reset settings from the device option.it is taking too long and its been 15 hours but not yet done.its showing a skeleton sigh with buffering and sometimes flipping to apple sign.

    nabidhadi wrote:
    .its showing a skeleton sigh with buffering and sometimes flipping to apple sign.
    You iPod has been jail broken.  Unfortunately you are on your own here. I can offer that you need to find out which method and software was used to JB.
    Good luck...you're gonna need it....

Maybe you are looking for