# HG changeset patch # User Pascal Bellard # Date 1292932141 -3600 # Node ID 791d1567e7c59c2c4ba292c370cb208f3d43372f # Parent a6cc66b552c6cf2869d2c7abfcc90e71f3681d61 get-opera: use deb archive, save 3MB (tanks Ruari) diff -r a6cc66b552c6 -r 791d1567e7c5 get-opera/stuff/get-opera --- a/get-opera/stuff/get-opera Tue Dec 21 15:30:57 2010 +0800 +++ b/get-opera/stuff/get-opera Tue Dec 21 12:49:01 2010 +0100 @@ -25,10 +25,10 @@ sed -e 's/href="\(.*\)">.*/\1/' -e 's|/||' } -# Download rpm +# Download deb for RELEASE in $(get_releases); do [ -n "$RELEASE" ] || continue - FILE=$(wget -O - "$URL$RELEASE/" 2> /dev/null | grep i386.rpm | sed 's/.*href="\(.*\)">.*/\1/' | head -n 1) + FILE=$(wget -O - "$URL$RELEASE/" 2> /dev/null | grep i386.deb | sed 's/.*href="\(.*\)">.*/\1/' | head -n 1) [ -n "$FILE" ] || continue wget $URL$RELEASE/$FILE [ -s $FILE ] && break @@ -41,17 +41,17 @@ exit 1 fi -RELEASE=$(rpm -qip $FILE | awk '/^Release/ { print $3 }') -VERSION=$(rpm -qip $FILE | awk '/^Version/ { print $3 }')-$RELEASE +mkdir opera +dpkg-deb -e $FILE opera/meta +dpkg-deb -x $FILE opera/fs +# extracted pkg can be removed: Save RAM +rm -f $FILE +sed '/^Description:/,$!d;s/^Description://' \ + < opera/meta/control > opera/description.txt -mkdir -p opera-$VERSION/fs - -# Extract files +VERSION=$(grep ^Version opera/meta/control | awk '{ print $2 }') +mv opera opera-$VERSION cd opera-$VERSION/fs -rpm -qip ../../$FILE > description.txt -rpm2cpio < ../../$FILE | cpio -idm -# extracted pkg can be removed: Save RAM -rm -f ../../$FILE # Create menu mkdir -p usr/share/applications