tazlito rev 365

Fix VERSION in Makefile
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Dec 05 09:45:32 2014 +0100 (2014-12-05)
parents 3e7b52cf2f91
children a84d908c453b
files Makefile tazlito
line diff
     1.1 --- a/Makefile	Fri Nov 28 21:48:29 2014 +0100
     1.2 +++ b/Makefile	Fri Dec 05 09:45:32 2014 +0100
     1.3 @@ -33,6 +33,9 @@
     1.4  install: msgfmt
     1.5  	install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
     1.6  	install -m 0777 tazlito $(DESTDIR)$(PREFIX)/bin
     1.7 +	-[ "$(VERSION)" ] && sed -i 's/^VERSION=[0-9].*/VERSION=$(VERSION)/' $(DESTDIR)$(PREFIX)/bin/tazlito
     1.8 +	ln -s tazlito $(DESTDIR)$(PREFIX)/bin/deduplicate
     1.9 +	ln -s tazlito $(DESTDIR)$(PREFIX)/bin/reduplicate
    1.10  	install -m 0777 tazlito-wiz $(DESTDIR)$(PREFIX)/bin
    1.11  	install -m 0755 -d $(DESTDIR)/etc/tazlito
    1.12  	install -m 0644 tazlito.conf $(DESTDIR)/etc/tazlito
    1.13 @@ -52,6 +55,8 @@
    1.14  
    1.15  uninstall:
    1.16  	rm -f $(PREFIX)/bin/tazlito
    1.17 +	rm -f $(PREFIX)/bin/deduplicate
    1.18 +	rm -f $(PREFIX)/bin/reduplicate
    1.19  	rm -f $(PREFIX)/bin/tazlito-wiz
    1.20  	rm -f $(PREFIX)/var/www/tazpanel/menu.d/boot/live
    1.21  	rm -f $(PREFIX)/var/www/tazpanel/styles/default/images/tazlito.png
     2.1 --- a/tazlito	Fri Nov 28 21:48:29 2014 +0100
     2.2 +++ b/tazlito	Fri Dec 05 09:45:32 2014 +0100
     2.3 @@ -12,7 +12,7 @@
     2.4  # Authors : Christophe Lincoln <pankso@slitaz.org>
     2.5  #           Pascal Bellard <pascal.bellard@slitaz.org>
     2.6  #
     2.7 -VERSION=5.2.3
     2.8 +VERSION=5.2.5
     2.9  
    2.10  . /lib/libtaz.sh
    2.11  
    2.12 @@ -234,7 +234,7 @@
    2.13  create_iso()
    2.14  {
    2.15  	cd $2
    2.16 -	deduplicate .
    2.17 +	deduplicate
    2.18  	echo -n "Computing md5..."
    2.19  	find * -type f ! -name md5sum ! -name 'vmlinuz*' -exec md5sum {} \; > md5sum
    2.20  	sed -i  -e '/  boot\/isolinux\/isolinux.bin$/d' \
    2.21 @@ -381,7 +381,7 @@
    2.22  # Deduplicate files (MUST be on the same filesystem).
    2.23  deduplicate()
    2.24  {
    2.25 -	find "$@" -type f -xdev \
    2.26 +	find "${@:-.}" -type f -xdev \
    2.27  		-exec stat -c '%s-%a-%u-%g %i %h %n' {} \; | sort | \
    2.28  	( save=0; hardlinks=0; old_attr=""; old_inode=""; old_link=""; old_file=""
    2.29  	   while read attr inode link file; do
    2.30 @@ -438,7 +438,7 @@
    2.31  	cd $1
    2.32  
    2.33  	# Link duplicate files
    2.34 -	deduplicate .
    2.35 +	deduplicate
    2.36  
    2.37  	# Use lzma if installed. Display rootfs size in realtime.
    2.38  	rm -f /tmp/rootfs 2> /dev/null
    2.39 @@ -1178,6 +1178,10 @@
    2.40  ####################
    2.41  
    2.42  case "$0" in
    2.43 +	*reduplicate)
    2.44 +		find ${@:-.} ! -type d -links +1 \
    2.45 +			-exec cp -a {} {}$$ \; -exec mv {}$$ {} \;
    2.46 +		exit 0 ;;
    2.47  	*deduplicate)
    2.48  		deduplicate "$@"
    2.49  		exit 0 ;;