From 58b49efbcac56592a5d5b8f238408fa1c6e4d36e Mon Sep 17 00:00:00 2001 From: Beebles <102569435+beebls@users.noreply.github.com> Date: Sat, 12 Oct 2024 16:44:54 -0600 Subject: [PATCH] begin work on auto-style-commit script --- commit-styles-macos.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 commit-styles-macos.sh diff --git a/commit-styles-macos.sh b/commit-styles-macos.sh new file mode 100755 index 0000000..67ef9b1 --- /dev/null +++ b/commit-styles-macos.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# TODO: NOT FINISHED + +# This uses macos' sed, which is different from the one in linux + +css_file_path="$(dirname "$0")/src/styles/styles.css" +css_as_string_path="$(dirname "$0")/src/styles/styles-as-string.ts" + +# Read the content of the CSS file, ignoring lines that start with '/*' +css_content=$(sed '/^\s*\/\*/d' "$css_file_path") + +export_header_line_number=$(grep -n "export const styles" $css_as_string_path | cut -d: -f1) +echo export_header_line_number: $export_header_line_number \ No newline at end of file