Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 06 Dec 2019, 07:53
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
SFS-Remover
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [21 Posts]   Goto page: Previous 1, 2
Author Message
stemsee

Joined: 27 Jun 2013
Posts: 2539
Location: In The Way

PostPosted: Fri 19 Feb 2016, 17:31    Post subject:  

your .pet package has a superfluous directory level. Try this one!
all_sfs_unloader.pet
Description 
pet

 Download 
Filename  all_sfs_unloader.pet 
Filesize  1.01 KB 
Downloaded  138 Time(s) 
Back to top
View user's profile Send private message MSN Messenger 
greengeek


Joined: 20 Jul 2010
Posts: 5624
Location: Republic of Novo Zelande

PostPosted: Fri 19 Feb 2016, 20:27    Post subject:  

stemsee wrote:
your .pet package has a superfluous directory level
Thanks for the mod version - although I can't see any difference between the two pets. Can you explain what you meant by superfluous directory? Do you mean within the pet or within the script? cheers.
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2539
Location: In The Way

PostPosted: Sat 20 Feb 2016, 05:17    Post subject:  

when you extract the pet there is a sub-dir within which are the '/' dirs.
Back to top
View user's profile Send private message MSN Messenger 
greengeek


Joined: 20 Jul 2010
Posts: 5624
Location: Republic of Novo Zelande

PostPosted: Sat 20 Feb 2016, 15:08    Post subject:  

I'm a bit confused. I can't see the issue you are referring to. Here is a pic of what I see when I extract your pet and mine:
stemsee_comparison.jpg
 Description   
 Filesize   87.52 KB
 Viewed   146 Time(s)

stemsee_comparison.jpg

Back to top
View user's profile Send private message 
Pelo

Joined: 10 Sep 2011
Posts: 12591
Location: Mer méditerrannée (1 kms°)

PostPosted: Tue 01 Mar 2016, 03:46    Post subject: all_sfs_unloader.pet by stemsee downloaded.  

all_sfs_unloader.pet by stemsee downloaded.
A quick check with pfind remains useful to clean traces remaining.

_________________
Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.
Back to top
View user's profile Send private message Yahoo Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2539
Location: In The Way

PostPosted: Fri 15 Nov 2019, 14:24    Post subject:  

Just cleaned up sfs -remover (rmsfs)

Code:
#!/bin/sh
#sfs remover by stemsee
#
#For removing all files in an sfs module that has been added to main sfs
#by remastering or added flat (manually copied in) to a full install or savefile etc. Requires original
#( or any) sfs module for building list of files to be removed.
#for example a devx_vivid_beta.sfs to remove development files.
#The list that is built can also be used as an installed file list in
#~/.packages/ . So that running this script before creating an sfs module
#from a dir and saving the resultant list to $HOME/.packages/${name}.files
#will give the option to uninstall files using ppm or slocategui
#and apptree.
#
[[ "$(whoami)" != "root" ]] && exec sudo -E -S ${0} "$\""
export FPROG="$0"
export PROG=$(basename "$0")
running=$(ps -e | grep "$FPROG" | wc -l)
[[ "$running" -gt 2 ]] && exit #check if running, one instance only
export OUTPUT_CHARSET=UTF-8

for i in yad tree
do
   not=$(busybox which $i)
   [[ -z "$not" ]] && echo "$i" >> /tmp/missdeps
done
keg=$(cat /tmp/missdeps 2>/dev/null)
[[ ! -z "$keg" ]] && xmessage -center "Without these missing dependencies
$keg

- rmsfs may not be fully functional

rmsfs copyright (c) 2018 Marcos Contant
GPL 3.0 license applies.
Version 1.2" -fore black -back green -timeout 4
if [ ! -z "$1" ]; then
   hit="$1"      
else
   hit=$(yad --title "Enter /path/to/*.sfs" --entry)
   [[ $? -eq 1 ]] && exit
fi
[[ -z "$hit" ]] && exit
export hitmd=$(echo "$hit" | rev | cut -f1 -d '/' | rev)

rmfn () {
[[ -d /tmp/"$hitmd" ]] && umount -l /tmp/"$hitmd" 2>/dev/null
sleep 3
[[ -d /tmp/"$hitmd" ]] && rm -rf /tmp/"$hitmd"
}
deps=$(busybox which tree)
if [ -z "$deps" ]; then
   echo "Please install tree"
   sleep 4
   exit 0
fi
if [ -f "$hit" ]; then
   rmfn
   mkdir /tmp/"$hitmd"
   mount -loop -t squashfs "$hit" /tmp/"$hitmd"
   size=$(du -chk /tmp/$hitmd | tail -1 | cut -f1 -d 't' | rev | cut -c2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 |rev)
   size=$(echo "$size"K)
   sleep 2
   cd /tmp/"$hitmd"
fi
tree -fiF --noreport | sed '/\/$/d' > /tmp/rmsfs.lst
sed -i 's|./|/|' /tmp/rmsfs.lst
sed -i 1d /tmp/rmsfs.lst
sed -i 's/ .*//g' /tmp/rmsfs.lst
geany /tmp/rmsfs.lst &

yad --title "Enter yes to remove files or no to make list or q to quit" --text "Ready to remove displayed files from running system 'yes'?
If not then 'no' for a '$hitmd'.files list to be made in '/root/.packages/
or 'q' to quit" --width=600 --entry
ret=$?
[[ $ret -eq 1 ]] && exit
read hut
case $hut in
yes) while read line
   do
    [[ -e "$line" ]] && rm -rf $line
   done < /tmp/rmsfs.lst
   ldconfig
   cd ../;;
no) cp /tmp/rmsfs.lst $HOME/.packages/"$hitmd".files
   ins=$(cat /root/.packages/user-installed-packages | grep "$hitmd")
   if [[ -z "$ins" ]]; then
      echo "$hitmd|$hitmd|||Utility|$size||$hitmd||sfs module file list||||" >> /root/.packages/user-installed-packages
      yaf-splash -text "Uninstall list added" &
   fi
   ;;
q*) rmfn
sleep 3
exit 0;;
esac
rmfn
echo "done"
exit 0
Back to top
View user's profile Send private message MSN Messenger 
Display posts from previous:   Sort by:   
Page 2 of 2 [21 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0665s ][ Queries: 12 (0.0221s) ][ GZIP on ]