diff --git a/posix/maketi b/posix/maketi index 87d04a5..44f8aca 100755 --- a/posix/maketi +++ b/posix/maketi @@ -27,7 +27,7 @@ getlibs () readelf -d "$1" | grep NEEDED | awk '{print $5}' | - sed s/\\[/\ / | sed s/\\]/\ / > "$tmplist" + sed s/\\[// | sed s/\\]// > "$tmplist" # While there are more dependencies while [ "$(cat "$tmplist")" ]; do @@ -51,7 +51,7 @@ getlibs () readelf -d "$f" | grep NEEDED | awk '{print $5}' | - sed s/\\[/\ / | sed s/\\]/\ / >> "$tmpfile" + sed s/\\[// | sed s/\\]// >> "$tmpfile" fi done sort -u "$tmpfile" > "$tmplist" @@ -81,7 +81,7 @@ if ! [ -e "$WORKDIR"/id ]; then die 'id file not present' fi -if ls -1 "$WORKDIR"/bin; then +if [ "$(ls -1 "$WORKDIR"/bin)" ]; then for f in "$WORKDIR"/bin/*; do if ! [ -x "$f" ]; then die "$f is not executable" @@ -100,7 +100,7 @@ touch "$WORKDIR"/env # TODO: add usage and error checking DIRNAME="$WORKDIR"/"$(head -1 "$WORKDIR"/id | awk '{print $1}')" -echo "Fetching binary dependencies..." +echo "Fetching dependencies..." if [ -s "$WORKDIR"/deps ]; then while read -r d; do ( IFS=: @@ -111,7 +111,7 @@ if [ -s "$WORKDIR"/deps ]; then done < "$tmplist" fi -echo "Fetching dependencies and stripping binaries..." +echo "Fetching libraries and stripping binaries..." # TODO: get al binary dependencies from deps file # Get all dependencies and strip them for b in "$WORKDIR"/bin/*; do @@ -151,10 +151,10 @@ numsize="$(echo "$size" | wc -c)" normsize="$((size - (strsize - numsize) + 1))" sed s/BYTES/"$normsize"/ tpp > tpr -cat tpr "$DIRNAME".tar.lz4 > "$DIRNAME".ti +cat tpr "$DIRNAME".tar.lz4 > "$DIRNAME".tin echo "Cleaning up..." rm -f tpr tpp -chmod +x "$DIRNAME".ti +chmod +x "$DIRNAME".tin rm -rf "$DIRNAME" "$DIRNAME".tar*