Add compress messages

This commit is contained in:
q3aql 2024-06-23 20:47:12 +02:00
parent f9220e331f
commit e8e25ae2fc

View File

@ -73,16 +73,20 @@ pack() {
-e 's/^ld_so=[^ ]*$/ld_so='"$ld_so"'/' \ -e 's/^ld_so=[^ ]*$/ld_so='"$ld_so"'/' \
>"$dst" >"$dst"
tar $compress_flag -ch \ echo "Creating static executable $dst from $src"
--transform 's@.*/@'"$program"'.res/@' \ for libraries in ${libs} ; do
"$src" $libs "$@" \ echo "Linking library ${libraries}"
>>"$dst" #\ done
#2> >(grep -v 'Removing leading' >&2) # bash extension echo "Creating executable linker"
echo "Building static executable in $dst"
tar $compress_flag -ch --transform 's@.*/@'"$program"'.res/@' "$src" $libs "$@" >>"$dst"
chmod +x "$dst" chmod +x "$dst"
echo "'$src' was packed to '$dst'" echo "Created successfully"
#echo "'$src' was packed to '$dst'"
echo ""
echo "$dst" | grep -q / || dst="./$dst" echo "$dst" | grep -q / || dst="./$dst"
echo "Just run '$dst ARGS...' to execute the command." echo "Just run '$dst <ARGS>' to execute the command."
echo "Or run 'PACKELF_UNPACK_DIR=xxx $dst' to unpack it only." echo "Or run 'PACKELF_UNPACK_DIR=xxx $dst' to unpack it only."
} }