classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view


Karl Godt
some functions to make managing of /tmp/root and /tmp/etc easier for me :

+local RV
+if test "${RV//[[:digit:]]/}"; then
+echo "Usage: __emerg_exit EXITCODE \"MESSAGE\""
+echo "$*"
+exit $RV
+pidof ROX-Filer >/dev/null || return
+rox "$1"
+local RV
+#--yesno	<text> <height> <width>
+Xdialog --title "$m_01" --yesno	"$(gettext "Are You Sure ?
+Click 'Yes' to proceed with $0 program.
+Click 'No' to wait.
+Click 'Cancel' icon in window titlebar to quit $0
+")" 0 0
+case $RV in
+0) return 0;;
+1) return 1;;
+255) exit 0;;
+*) echo "$(gettext 'Unhandled Xdialog return code '$RV'')" >&2; return 1;;
+local SURE
+while test "$SURE" != 0; do

use a DISTRO_NAME-DISTRO_VERSION build directory name :
+echo "'$buildDIR'"
+buildDIR=`echo "$buildDIR" | tr '[:blank:]' '_' | sed 's/\./XxX/g;s/-/xXx/g'`
+echo "'$buildDIR'"
+buildDIR=`echo "$buildDIR" | sed 's/_/YyY/g'`
+echo "'$buildDIR'"
+if test "`echo "$buildDIR" | grep -E '[[:blank:]]|[[:punct:]]'`"; then
+buildDIR=`echo "$buildDIR" | sed 's/XxX/\./g;s/xXx/-/g;s/YyY/_/g'`
+echo "'$buildDIR'"

use loop to cp files from /root from a LIST and diff these files,
add .Xdefaults and .Xresources to LIST
+while read oneFILE
+test "$oneFILE" || continue
+test -d /tmp/root/"$fileDIR" || { mkdir -p /tmp/root/"$fileDIR" || continue; }
+diff -qs /root/"$oneFILE" /tmp/root/"$oneFILE" && continue
+cp -af /root/"$oneFILE" /tmp/root/"$oneFILE" || continue ## or break ? :)
+`echo "$rootfiles_cpLIST"`
+#v411 tidy up, remove desktop drive icons...
+grep -v '/root/.pup_event/drive_' /tmp/root/Choices/ROX-Filer/PuppyPin > /tmp/remaster-PuppyPin
+test $? = 0 || return 9
+test -s /tmp/remaster-PuppyPin || return 9
+grep -q '</pinboard>' /tmp/remaster-PuppyPin || return 9
+mv -f /tmp/remaster-PuppyPin /tmp/root/Choices/ROX-Filer/PuppyPin
+return $?
+test $RV = 0 || {
+test $RV != 9 && cp -af /root/Choices/ROX-Filer/PuppyPin /tmp/root/Choices/ROX-Filer/PuppyPin; }
same with /etc ?

open rox window in /root and /tmp/root
+_open_rox_window "/root"
+_open_rox_window "/tmp/root/"
give some useful info in message_19
$(gettext '(if you think that this program has missed out something important that  should be burnt into /root on the CD, please let me know -- Barry Kauler)')
+$(gettext 'files that are new are mainly window/desktop manager,')
+$(gettext 'X and ppm configuration files')
ask for confirmation to go on using _sure function ( in case have forgotten something ( as usual) )
 $(eval_gettext "After examining /tmp/root, click 'Ok' to add /root in \${PUPPYSFS} file...")"
 Xdialog --wrap --left --title "$m_01" --msgbox "$m_19" 0 80

Anyone interested ?