how to check all your .pet packages for woof compatibility

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
learnhow2code

how to check all your .pet packages for woof compatibility

#1 Post by learnhow2code »

save as /usr/bin/ckpet:

Code: Select all

#!/bin/bash
#### license: creative commons cc0 1.0 (public domain) 
#### http://creativecommons.org/publicdomain/zero/1.0/
p=$(find -name 'ckpetworkng' 2> /dev/null | wc -l)
if [[ "$p" == "0" ]] ; then echo 

p=""
while [[ 1 ]]
do read p
if [[ "$p" == "" ]] ; then break ; fi
echo --------------------------------------------------------------------------------
echo "$p"
echo
sudo rm -rf ckpetworkng 2> /dev/null 
sudo mkdir ckpetworkng
cd ckpetworkng
sudo tar -xf "../$p" 2> /dev/null 
find -exec file '{}' \; 2> /dev/null | sed "s/\:/\n\:/g" | grep "\:" | sort | uniq -c
cd ..
done
sudo rm -rf ckpetworkng 2> /dev/null 

else echo "file or folder ckpetworkng found; quitting..." 
echo '(ckpetworkng is used as a working folder, then rm rfd)' ; fi 
usage:

find . -name '*.pet' | ckpet

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#2 Post by Sailor Enceladus »

Do I really need sudo if I'm root?

learnhow2code

#3 Post by learnhow2code »

Sailor Enceladus wrote:Do I really need sudo if I'm root?
no, you can remove all the sudos-- i use them, although you may think thats silly

oh and here is a version that uses ldd, too:

Code: Select all

#!/bin/bash
#### license: creative commons cc0 1.0 (public domain)
#### http://creativecommons.org/publicdomain/zero/1.0/
p=$(find -name 'ckpetworkng' 2> /dev/null | wc -l)
if [[ "$p" == "0" ]] ; then echo

p=""
while [[ 1 ]]
do read p
if [[ "$p" == "" ]] ; then break ; fi
echo --------------------------------------------------------------------------------
echo "$p"
echo
sudo rm -rf ckpetworkng 2> /dev/null
sudo mkdir ckpetworkng
cd ckpetworkng
sudo tar -xf "../$p" 2> /dev/null
find -exec file '{}' \; 2> /dev/null | sed "s/\:/\n\:/g" | grep "\:" | sort | uniq -c
echo -
find -exec ldd '{}' \; 2> /dev/null | sed 's/0xb/\n0xb/g' | egrep -v '0xb|not a dynamic executable' | tr -d '(' | sort | uniq
cd ..
done
sudo rm -rf ckpetworkng 2> /dev/null

else echo "file or folder ckpetworkng found; quitting..."
echo '(ckpetworkng is used as a working folder, then rm rfd)' ; fi 

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#4 Post by slavvo67 »

Are there really .pet packages that are not compatible with Woof? I know of one and only because of its elaborate Pinstall.

Can you elaborate on the title a bit?

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#5 Post by musher0 »

Hi slavvo67,

Euh... learnhow2code having requested to be banned a couple of months
ago, I'm afraid your question will have to remain unanswered...
https://www.youtube.com/results?search_ ... arles+ives

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#6 Post by slavvo67 »

Musher0:

Thanks for the song!!

:lol:

Post Reply