# HG changeset patch # User Pascal Bellard # Date 1417769132 -3600 # Node ID 57142e32ff6ec651699d125bf5f04300a7523c62 # Parent 3e7b52cf2f918e1e125b5a8a2003e5ddc711b599 Fix VERSION in Makefile diff -r 3e7b52cf2f91 -r 57142e32ff6e Makefile --- a/Makefile Fri Nov 28 21:48:29 2014 +0100 +++ b/Makefile Fri Dec 05 09:45:32 2014 +0100 @@ -33,6 +33,9 @@ install: msgfmt install -m 0755 -d $(DESTDIR)$(PREFIX)/bin install -m 0777 tazlito $(DESTDIR)$(PREFIX)/bin + -[ "$(VERSION)" ] && sed -i 's/^VERSION=[0-9].*/VERSION=$(VERSION)/' $(DESTDIR)$(PREFIX)/bin/tazlito + ln -s tazlito $(DESTDIR)$(PREFIX)/bin/deduplicate + ln -s tazlito $(DESTDIR)$(PREFIX)/bin/reduplicate install -m 0777 tazlito-wiz $(DESTDIR)$(PREFIX)/bin install -m 0755 -d $(DESTDIR)/etc/tazlito install -m 0644 tazlito.conf $(DESTDIR)/etc/tazlito @@ -52,6 +55,8 @@ uninstall: rm -f $(PREFIX)/bin/tazlito + rm -f $(PREFIX)/bin/deduplicate + rm -f $(PREFIX)/bin/reduplicate rm -f $(PREFIX)/bin/tazlito-wiz rm -f $(PREFIX)/var/www/tazpanel/menu.d/boot/live rm -f $(PREFIX)/var/www/tazpanel/styles/default/images/tazlito.png diff -r 3e7b52cf2f91 -r 57142e32ff6e tazlito --- a/tazlito Fri Nov 28 21:48:29 2014 +0100 +++ b/tazlito Fri Dec 05 09:45:32 2014 +0100 @@ -12,7 +12,7 @@ # Authors : Christophe Lincoln # Pascal Bellard # -VERSION=5.2.3 +VERSION=5.2.5 . /lib/libtaz.sh @@ -234,7 +234,7 @@ create_iso() { cd $2 - deduplicate . + deduplicate echo -n "Computing md5..." find * -type f ! -name md5sum ! -name 'vmlinuz*' -exec md5sum {} \; > md5sum sed -i -e '/ boot\/isolinux\/isolinux.bin$/d' \ @@ -381,7 +381,7 @@ # Deduplicate files (MUST be on the same filesystem). deduplicate() { - find "$@" -type f -xdev \ + find "${@:-.}" -type f -xdev \ -exec stat -c '%s-%a-%u-%g %i %h %n' {} \; | sort | \ ( save=0; hardlinks=0; old_attr=""; old_inode=""; old_link=""; old_file="" while read attr inode link file; do @@ -438,7 +438,7 @@ cd $1 # Link duplicate files - deduplicate . + deduplicate # Use lzma if installed. Display rootfs size in realtime. rm -f /tmp/rootfs 2> /dev/null @@ -1178,6 +1178,10 @@ #################### case "$0" in + *reduplicate) + find ${@:-.} ! -type d -links +1 \ + -exec cp -a {} {}$$ \; -exec mv {}$$ {} \; + exit 0 ;; *deduplicate) deduplicate "$@" exit 0 ;;