This is the old SliTaz forum - Please use the main forum.slitaz.org

Automated convert/install script
  • RuppRupp April 2010
    I wrote a simple script that can somewhat automate SliTaz's converting and installing of different binaries i.e. (.deb,rpm,tgz,pkg.tar.gz). You'll see the script below. I am just gonna tell you some things you will want to do. You will want to edit the line "cd /home/*/Downloads" if you download to a different folder. So copy and paste either of the two scripts at the bottom to a text file. I named mine conv-install but you can name it anything then I symlinked it like this after I knew it worked:
    ln -s /home/*/scripts/conv-install

    Then when you download something to your download folder. Do this from terminal as root:
    conv-install /home/*/Downloads/myexample.deb

    It will then convert and install for you.

    Below are the two scripts:
    Short version. This one just converts and installs.

    #! /bin/bash

    # automated convert and install script from downloaded binaries.
    # created 4/17/2010
    # creator Rupp

    cd /home/*/Downloads
    for file in $*
    do
    echo
    echo
    echo Converting $file
    echo
    tazpkg convert $file
    done
    echo
    echo
    echo
    echo
    for t in *.tazpkg; do
    tazpkg install "$t" --forced
    done

    Full one below with the options of moving your converted ".tazpkg" to a backup folder after it is installed. Then an option to delete the original binary. You can answer no also. It will just skip those steps

    #! /bin/bash

    # automated convert and install script from downloaded binaries.
    # created 4/17/2010
    # creator Rupp
    cd /home/*/Downloads
    for file in $*
    do
    echo
    echo
    echo Converting $file
    echo
    tazpkg convert $file
    done
    echo
    echo
    echo
    echo
    for t in *.tazpkg; do
    tazpkg install "$t" --forced
    done
    echo
    echo
    read -p "Should I move the .tazpkg to your backup folder? ";
    if [ $REPLY == "y" ]; then
    echo
    echo
    echo done;
    fi

    for t in *.tazpkg; do
    mv "$t" /media/disk/tazpkg
    done
    echo
    echo
    echo
    read -p "Should I delete the original binary you converted?";
    if [ $REPLY == "y" ]; then
    echo
    echo
    echo done;
    fi
    for file in $*
    do
    echo
    echo
    rm $file
    done
    echo
    echo


    Give it a try. I have made another one for those of you who installed pacman from Archlinux. Download and convert then install from command line similar to tazpkg get-install. If anyone is interested in it let me know.



    Rupp

    P.S. If you edit it let me know. I'd like to see what you've done to make it even better.
  • slicelslicel April 2010
    If you mean you combined the convert and the install into one step, that is useful, thank you.

    Something I mentioned on the old forum is that it would be nice if the right-click menu was editable and modular to add scripts like yours or printing to the right-click menu.

    Thank you.
  • slicelslicel April 2010
    I removed a double post.
  • RuppRupp April 2010
    @slicel

    Yeah that is what I said. I am just combining the two steps. SliTaz still does all the work. I am still tweaking it. Will update it.



    Rupp

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social