author | Dan |
Tue, 23 Jun 2009 09:55:13 -0400 | |
changeset 2 | 7dddb5fb1595 |
parent 1 | dbce0b16b0c1 |
permissions | -rwxr-xr-x |
1
dbce0b16b0c1
Added shellscript compactor to reduce size of self-extract script
Dan
parents:
diff
changeset
|
1 |
#!/bin/sed -f |
dbce0b16b0c1
Added shellscript compactor to reduce size of self-extract script
Dan
parents:
diff
changeset
|
2 |
# Remove comments, except for the shebang |
dbce0b16b0c1
Added shellscript compactor to reduce size of self-extract script
Dan
parents:
diff
changeset
|
3 |
s/^ *#[^!#].*$// |
dbce0b16b0c1
Added shellscript compactor to reduce size of self-extract script
Dan
parents:
diff
changeset
|
4 |
# Remove spaces at the beginning of all lines |
dbce0b16b0c1
Added shellscript compactor to reduce size of self-extract script
Dan
parents:
diff
changeset
|
5 |
s/^ *// |
dbce0b16b0c1
Added shellscript compactor to reduce size of self-extract script
Dan
parents:
diff
changeset
|
6 |
# Remove empty lines |
dbce0b16b0c1
Added shellscript compactor to reduce size of self-extract script
Dan
parents:
diff
changeset
|
7 |
/^$/d |