NotasNotas
  • Notas

    • ADB
    • Bookmarks, marcadores, favoritos,...
    • Desktop files (linux)
    • Docker
    • Docker Compose
    • Flutter
    • Flutter Code Snippets
    • Flutter Links
    • Flutter Packages
    • FSTAB
    • Git
    • Github Emojis
    • GPG
    • Grub
    • Lego
    • Linux
    • MACOS
    • Oh My ZSH!
    • Miscelánea
    • Raspberry Pi
    • PSP
    • PSVITA
    • React Native
    • React Native Links
    • React Native Packages
    • TP-Link Archer T2U Plus
    • TP-Link Archer T3U Plus
    • Visual Studio Code
    • Windows

PSP

7z

Compress

Show
#!/bin/bash
version="0.1"

function error() {
        echo -n "$SCRIPTNAME: ERROR occured in line $1: "
        shift
        echo "$@"
}

function 7zCompress(){
    for command in 7z; do
            command -v $command >/dev/null 2>&1
            if (( $? != 0 )); then
                    error $LINENO "$command is not installed."
                    exit -4
            fi
    done
    7z a -mx=9 -mmt=on -aoa "${1%.*}.7z" "$1"
}


for f in *.iso; do
    7zCompress "$f";
done

Descompress

Show
#!/bin/bash
version="0.1"

function error() {
        echo -n "$SCRIPTNAME: ERROR occured in line $1: "
        shift
        echo "$@"
}

function 7zDescompress(){
    for command in 7z; do
            command -v $command >/dev/null 2>&1
            if (( $? != 0 )); then
                    error $LINENO "$command is not installed."
                    exit -4
            fi
    done
    7z x "$1"
}


for f in *.7z; do
    7zDescompress "$f";
done

CISO

Compress

Show

Descompress

Show

Original Source

Show

On Ubuntu:

sudo apt install ciso -y

then paste this into a shell script:

#!/bin/bash

version="0.2"

if [ "$#" -ne 1 ]; then
echo "Usage: $(basename $0) [iso file]"
exit 0
fi

function error() {
echo -n "$SCRIPTNAME: ERROR occured in line $1: "
        shift
        echo "$@"
}

echo ${0##.\*} $version

#Usage Checks
for command in ciso; do
command -v $command >/dev/null 2>&1
        if (( $? != 0 )); then
                error $LINENO "$command is not installed."
exit -4
fi
done

ciso 9 "$1" "${1%.\*}.cso"

then

chmod +x whateveryourscriptnameis.sh

then finally, to batch process a bunch of isos in a directory run

for f in \*.iso; do whateveryourscriptnameis.sh "$f"; done

Sit back, get a cup of coffee and let bash do all the work.

Actualizado el:: 7/1/24, 12:24
Contributors: Manuel Muñoz
Prev
Raspberry Pi
Next
PSVITA