summaryrefslogtreecommitdiff
path: root/tools/meta-rip
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-06-24 22:55:29 -0400
committerIan Moffett <ian@osmora.org>2024-06-24 22:55:29 -0400
commit236963e7563be3e3f8220dac7bb4af446928e194 (patch)
treee521ea226db0345bbb3679fffe09d96254b7dc73 /tools/meta-rip
parent214eadc62b5578f76c98a38a28f8b3d80ac4d6ad (diff)
Clean out for expt
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'tools/meta-rip')
-rwxr-xr-xtools/meta-rip46
1 files changed, 0 insertions, 46 deletions
diff --git a/tools/meta-rip b/tools/meta-rip
deleted file mode 100755
index 45e811f..0000000
--- a/tools/meta-rip
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-if [[ ! -f $1 ]]
-then
- echo "File not found: $1"
- exit
-fi
-
-readelf -S $1 | grep -q "\.meta\.note" > /dev/null
-if [ $? -ne 0 ]
-then
- echo "No metadata in ELF; '.meta.note' non-existent"
- exit
-fi
-
-meta=$(objcopy $1 /dev/null --dump-section .meta.note=/dev/stdout | cat | tr -d '\0')
-
-# Remove the leading and trailing '$' characters
-meta=${meta#'$'}
-meta=${meta%'$'}
-
-# Use regular expression to extract the cookie, filename, author, and description
-if [[ $meta =~ ^([^:]+):\s*([^,]+),\s*([^,]+),\s*(.*)$ ]]; then
- cookie=${BASH_REMATCH[1]}
- filename=${BASH_REMATCH[2]}
- author=${BASH_REMATCH[3]}
- description=${BASH_REMATCH[4]}
- cookie=${cookie%?} # Remove the last character
-fi
-
-if [[ $cookie != "Hyra" ]]
-then
- echo "Invalid cookie found!"
- exit
-fi
-
-# Trim leading spaces
-cookie=$(echo "$cookie" | sed -e 's/^[[:space:]]*//')
-filename=$(echo "$filename" | sed -e 's/^[[:space:]]*//')
-author=$(echo "$author" | sed -e 's/^[[:space:]]*//')
-description=$(echo "$description" | sed -e 's/^[[:space:]]*//')
-
-echo "Cookie: $cookie"
-echo "Filename: $filename"
-echo "Author: $author"
-echo "Description: $description"