Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- clear
- cd "$(pwd)"
- echo $(pwd) > log.txt
- files=($(ls *.bin ))
- for i in ${files[@]}
- do
- cp -a "$i" "$i.zip"
- echo -n "PK" | dd of="$i.zip" conv=notrunc
- 7z x -aoa -o"${i%.bin}" "$i.zip"; rm "$i.zip"
- Filenames=$(ls ${i%.bin}/*.img)
- for f in ${Filenames[@]}
- do
- clear
- Path=$(echo "$f" | cut -d"/" -f1)/$(echo "$f" | cut -d"/" -f2 | cut -d"-" -f1)
- 7z x -aoa -o"$Path" $f
- if ! [ -d "$Path" ]; then
- rm $f
- fi
- done
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement