feat: further improvement of the build and compress script
This commit is contained in:
7
build.sh
7
build.sh
@@ -1,7 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd build
|
cd build
|
||||||
cmake --build .
|
cmake --build .
|
||||||
echo "dd bs=1 skip=61<\$0|unlzma>/tmp/C;chmod +x /tmp/C;/tmp/C;exit" > two
|
CMD="#!/bin/bash
|
||||||
|
dd bs=1 skip=%s<\$0|unlzma>/tmp/C;chmod +x /tmp/C;trap '' HUP;/tmp/C&"
|
||||||
|
COUNT=$(printf "$CMD" | wc -c)
|
||||||
|
EXTRA=$(printf "$COUNT" | wc -c)
|
||||||
|
COUNT=$((COUNT + EXTRA + 1))
|
||||||
|
echo "$CMD" | sed 's/%s/'"$COUNT"'/' > two
|
||||||
chmod +x two
|
chmod +x two
|
||||||
sstrip one
|
sstrip one
|
||||||
lzma -9 one
|
lzma -9 one
|
||||||
|
|||||||
Reference in New Issue
Block a user