Andy Bakun wrote:
> On Thu, 2006-05-04 at 18:45 +0200, Christian Haugan Toldnes wrote:
>> All former swup developers works on other projects, for other employers, 
>> and use other distributions than Trustix Secure Linux. I will be very 
>> surprised if this bug is ever fixed.
>>
>> Projects without active development usually drowns in the big ocean, 
>> where alternativ projects with active development swim closer to the 
>> surface. ;)
>>
>> As far as the changelog tells me, I was the last developer to touch 
>> swup, more than 8 months ago:
>>
>> 2005-08-26 - SWUP version 2.7.16
> 
> This is too bad, because swup is a fine tool, and much simpler than apt.
> I've set up swup repositories for a Fedora install before, it's so cool.
> 
> I have considered taking over development, but my python mojo is
> lacking.
> 

I had 10 minutes of spare time:

#!/bin/sh
#
# Christians ten minute apt wrapper script for former swup users
#

operation=$1
shift
arguments=$@
argstring=""
for arg in $arguments; do
        # FIXME:
        # Here we should check if the argument starts with '--' and
        # rather add those to operation, like:
        # swup --install --poll-only --verbose foobar
        argstring="$argstring $arg"
done
command="This operation is not yet supported."
case "$operation" in
        '--install')
        apt-get update
        apt-get install $argstring
        ;;
        '--upgrade')
        apt-get update
        apt-get -u dist-upgrade
        ;;
        '*')
        echo "'$operation' is not recognised."
        ;;
esac
# DONE

Save that as /usr/bin/swup and chmod 755. Then fix the FIXME that I
didn't have time or bash-skills to do within the given timespan, and
extend to include all commands needed. :) A small usage as well perhaps?
;) Ohh, yes, it's never been untested... :)

c

-- 
Christian Haugan Toldnes
Teenage Mutant Ninja Turtle
_______________________________________________
tsl-discuss mailing list
[email protected]
http://lists.trustix.org/mailman/listinfo/tsl-discuss

Reply via email to