tazpkg diff stripall.sh @ rev 973

tazpanel-pkgs.desktop: remove toolbar
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 15 15:04:42 2020 +0100 (2020-02-15)
parents a02e36d44d06
children
line diff
     1.1 --- a/stripall.sh	Fri Aug 28 16:10:34 2015 +0300
     1.2 +++ b/stripall.sh	Sat Feb 15 15:04:42 2020 +0100
     1.3 @@ -42,16 +42,7 @@
     1.4  	msg				\n	msgerr			\n	msgwarn			\n	msgup	
     1.5  	msgtip			\n	vpn			" | \
     1.6  	while read icon symbol; do
     1.7 -		echo -n "s|data-icon=\"$icon\"|data-icon=\"$symbol\"|g; " >> "$sed_script"
     1.8 -		echo -n "s|data_icon=\"$icon\"|data_icon=\"$symbol\"|g; " >> "$sed_script"
     1.9 -		echo -n "s|repo_icon=\"$icon\"|repo_icon=\"$symbol\"|g; " >> "$sed_script"
    1.10 -		case $icon in
    1.11 -			clock)
    1.12 -				echo -n "s|dataset\.icon==\"$icon\"|dataset.icon==\"$symbol\"|g; " >> "$sed_script";;
    1.13 -			pkg|pkgi|pkgib)
    1.14 -				echo -n "s|data-icon=\\\\\"$icon\\\\\"|data-icon=\\\\\"$symbol\\\\\"|g; " >> "$sed_script";;
    1.15 -		esac
    1.16 -		echo -n "s|data-img=\"$icon\"|data-img=\"$symbol\"|g; " >> "$sed_script"
    1.17 +		echo -n "s|@$icon@|$symbol|g; " >> "$sed_script"
    1.18  	done
    1.19  	echo "' @@@" >> "$sed_script"
    1.20  
    1.21 @@ -62,20 +53,34 @@
    1.22  for CGI in $(ls | grep -v \.css$ | grep -v \.js$); do
    1.23  	echo "Processing $CGI"
    1.24  
    1.25 -	mv $CGI $CGI.old
    1.26 -	# Copy initial comment (down to empty line)
    1.27 -	sed '1,/^$/!d' $CGI.old > $CGI
    1.28 -	# Remove initial tabs, other comments and empty lines
    1.29 -	sed 's|^\t*||;/^ *#/d;/^$/d' $CGI.old >> $CGI
    1.30 -	rm $CGI.old
    1.31 +	case $CGI in
    1.32 +		tazpkg.*.html)
    1.33 +			# doc/tazpkg.*.html
    1.34 +			substitute_icons $CGI
    1.35 +			if [ -n "$(which tidy)" ]; then
    1.36 +				tidy  -m  -q  -w 0  -utf8  --new-inline-tags x-details  --quote-nbsp n  \
    1.37 +					--tidy-mark n  $CGI
    1.38 +			else
    1.39 +				sed -i 's|[ 	][ 	]*| |g; s|^ ||' $CGI
    1.40 +			fi
    1.41 +			;;
    1.42 +		*)
    1.43 +			mv $CGI $CGI.old
    1.44 +			# Copy initial comment (down to empty line)
    1.45 +			sed '1,/^$/!d' $CGI.old > $CGI
    1.46 +			# Remove initial tabs, other comments and empty lines
    1.47 +			sed 's|^\t*||;/^ *#/d;/^$/d' $CGI.old >> $CGI
    1.48 +			rm $CGI.old
    1.49  
    1.50 -	substitute_icons $CGI
    1.51 +			substitute_icons $CGI
    1.52  
    1.53 -	sed -i 's|" *>|">|g' $CGI
    1.54 -	sed -i "s|' *)|')|g" $CGI
    1.55 -	sed -i 's| *;;|;;|g' $CGI
    1.56 +			sed -i 's|" *>|">|g' $CGI
    1.57 +			sed -i "s|' *)|')|g" $CGI
    1.58 +			sed -i 's| *;;|;;|g' $CGI
    1.59  
    1.60 -	chmod a+x $CGI
    1.61 +			chmod a+x $CGI
    1.62 +			;;
    1.63 +	esac
    1.64  
    1.65  done
    1.66