add gluonShellDiet to remove all comment lines in shell files

This commit is contained in:
rubo77 2017-06-12 07:15:47 +02:00
parent 4827f2df1b
commit 6beb5d800c
2 changed files with 7 additions and 0 deletions

View File

@ -32,6 +32,7 @@ endef
define Package/gluon-ebtables/install
$(CP) ./files/* $(1)/
./gluonShellDiet.sh $(1)/etc/init.d/*
endef
$(eval $(call BuildPackage,gluon-ebtables))

View File

@ -0,0 +1,6 @@
#!/bin/sh
# This script requires a file as argument (wildcards allowed)
# in which it will remove all comment lines that start with a hash '#'
sed -i '/^\s*\#[^!].*/d; /^\s*\#$/d' $1