Tiny Core Linux
General TC => Programming & Scripting - Unofficial => Topic started by: Jason W on December 07, 2011, 05:03:53 PM
-
Here is a tool that can be run in the current directory of .dep files and convert them to recursive based on the current state of the repo. Running it on my own as well as other's dep files brought to light a bit of redundancy.
#!/bin/sh
HERE=`pwd`
TREEDIR=/tmp/trees
KERN=`uname -r`
[ -d "$TREEDIR" ] && rm -r "$TREEDIR"
mkdir -p "$TREEDIR"/old
cd "$TREEDIR"
for I in `ls "$HERE"/*.dep`; do
EXT=`basename "$I" .dep`
sed -i "/$EXT/d" "$I"
if ls -A *.tree > /dev/null 2>&1; then
mv -f *.tree old/
fi
for E in `cat "$I"`; do
E=`echo "$E" | sed "s:KERNEL:$KERN:"`
if [ -f old/"$E".tree ]; then
cp old/"$E".tree .
else
wget -q http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/"$E".tree
fi
done
if ls -A *.tree >/dev/null; then
for B in `ls *.tree`; do
EXT=`basename "$B" .tree`
grep "^$EXT" "$B" >/dev/null && sed -i "/^$EXT/d" "$B"
done
fi
for F in `cat "$I"`; do
E=`echo "$F" | sed "s:KERNEL:$KERN:"`
grep "[[:blank:]]$E$" "$TREEDIR"/*.tree >/dev/null && sed -i "/$F/d" "$I"
done
done
-
Could you explain to me better what is it? serves to update .dep files without using appsaudit (and thus from any other distro), or is it something else?
-
Simply removed redundant entries in dep files making them recursive, for extension makers.
-
Uh, ah! OK :D
-
ehy jason, I dusted off this script for a moment, why not include it in the work of submitqc4 if there is a .dep to check the directory?
is very useful, no longer have to manually check if .dep is recursive
-
I personally like this one kept separate, as submitqc4 already takes so long, but I will consider it.
-
Hi Jason W
I agree, keeping it as a separate tool to be used as an aid for creating dependency files makes sense. Adding the
script to the submitqc extension might not be a bad idea. You could echo a message at the end of submitqc
asking the builder "Did you remember to run makerecursive?" as a reminder. The same holds true for your
genlddoutput script.
-
Thanks jason, without tcsubmit I'd be lost!