SHORT_DESC="Opera browser" WEB_SITE="http://www.opera.com/" # end of get.list data URL=https://ftp.opera.com/pub/opera/linux/ get_releases() { wget -qO- "$URL" | sed 's|.*[Ff]="\([^"/]*\).*|\1|;/[^0-9b]/d' | tac } # Download deb for RELEASE in $@ $(get_releases); do TARBALL=$(wget -O- "$URL$RELEASE/" 2>/dev/null |sed 's|.*[Ff]="\(.*\)".*|\1|;/6.d/!d;q'|sed 's/".*//') [ -n "$TARBALL" ] || continue WGET_URL=$URL$RELEASE/$TARBALL wget $WGET_URL [ -s $TARBALL ] && break done [ -f $TARBALL ] || abort_package mkdir $PACKAGE dpkg-deb -e $TARBALL $PACKAGE/meta dpkg-deb -x $TARBALL $PACKAGE/fs # extracted pkg can be removed: Save RAM rm -f $TARBALL sed '/^Description:/,$!d;s/^Description://' \ < $PACKAGE/meta/control > $PACKAGE/description.txt SHORT_DESC="$(sed '/^Description:/!d;s/.*: //' $PACKAGE/meta/control)" MAINTAINER="$(sed '/^Maintainer:/!d;s/.*: //' $PACKAGE/meta/control)" VERSION="$(sed '/^Version:/!d;s/.*: //' $PACKAGE/meta/control)" mv $PACKAGE $PACKAGE-$VERSION USR=$PACKAGE-$VERSION/fs/usr # Localized keyboard layout fix busybox sed "s|sh$|sh\nexport XMODIFIERS=\"@im=none\"|" -i $USR/bin/opera # Create menu mkdir -p $USR/share/applications cat > $USR/share/applications/opera-browser.desktop <