diff --git a/SRC/sl/Makefile.skel b/SRC/sl/Makefile.skel index 1049c34..732eb1c 100644 --- a/SRC/sl/Makefile.skel +++ b/SRC/sl/Makefile.skel @@ -80,13 +80,13 @@ VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SLVER) include /usr/share/sl/Makefile.snaplinux $(SRCDIR)/configure: $(ARCHIVE) - @if [ '$(TYPE)' == 'application/x-bzip2' ]; then \ + @if [ '$(TYPE)' = 'application/x-bzip2' ]; then \ tar -jxf $(ARCHIVE); \ - elif [ '$(TYPE)' == 'application/x-gzip' ]; then \ + elif [ '$(TYPE)' = 'application/x-gzip' ]; then \ tar -zxf $(ARCHIVE); \ - elif [ '$(TYPE)' == 'application/x-tar' ]; then \ + elif [ '$(TYPE)' = 'application/x-tar' ]; then \ tar -xf $(ARCHIVE); \ - elif [ '$(TYPE)' == 'application/x-xz' ]; then \ + elif [ '$(TYPE)' = 'application/x-xz' ]; then \ tar -xf $(ARCHIVE); \ else \ echo 'Unable to determine archive type'; \ diff --git a/SRC/sl/Makefile.snaplinux b/SRC/sl/Makefile.snaplinux index acfb578..e327f8d 100644 --- a/SRC/sl/Makefile.snaplinux +++ b/SRC/sl/Makefile.snaplinux @@ -65,6 +65,8 @@ endif SLINFO = $(SLDIR)/slinfo MANIFEST = $(SLDIR)/manifest USHER = $(SLDIR)/usher +CONFIGDIR = $(PWD)/CONFIG +CONFIG = $(SLDIR)/config.tar.gz FILES = $(SLDIR)/files.tar.gz # BRIEF is required. @@ -78,12 +80,19 @@ $(PKGFILE): $(SLINFO) $(FILES) rm -v $(PKGFILE); \ fi - @ar cvr $(PKGFILE) $(SLINFO) $(MANIFEST); \ + @ar cvr $(PKGFILE) $(SLINFO) $(MANIFEST) && \ if [ -f $(USHER) ]; then \ - chmod +x $(USHER); \ + chmod +x $(USHER) && \ ar cvr $(PKGFILE) $(USHER); \ - fi; \ - ar cvr $(PKGFILE) $(FILES) + fi && \ + ar cvr $(PKGFILE) $(FILES) && \ + if [ -d $(CONFIGDIR) ] && [ "$$(ls -A)" ]; then \ + cd $(CONFIGDIR) && \ + tar cvzf $(CONFIG) *; \ + if [ -f $(CONFIG) ]; then \ + ar cvr $(PWD)/$(PKGFILE) $(CONFIG); \ + fi; \ + fi @echo "Successfully built $(PKGFILE)" @@ -176,5 +185,9 @@ $(FILES): $(ROOT) ;; \ esac; \ done - @cd $(ROOT) && tar cvzf $(FILES) * - + @cd $(ROOT) && \ + if [ "$$(ls -A)" ]; then \ + tar cvzf $(FILES) *; \ + else \ + tar cvzf $(FILES) -T /dev/null; \ + fi diff --git a/SRC/sl/SL.pm b/SRC/sl/SL.pm index 1181a74..496743d 100644 --- a/SRC/sl/SL.pm +++ b/SRC/sl/SL.pm @@ -40,7 +40,7 @@ our @EXPORT = qw( $sl ); -our $VERSION = '0.18'; +our $VERSION = '0.19'; ############################################################ #