Our server pr0vider carried out maintenance on 15 January 2020 but it corrupted some files in the process. If you notice anything out of the ordinary (partial files, pages not loading, that kind of shit) then let us know at:

Browse Source

Let's put Bash helper skrips under version c0ntrol too kek

Wazakindjes 1 year ago
parent
commit
cb7e0d14bf
6 changed files with 39 additions and 4 deletions
  1. 2 4
      .gitignore
  2. 4 0
      bin/editconf.sh
  3. 7 0
      bin/findbom.sh
  4. 3 0
      bin/logtail.sh
  5. 7 0
      bin/trimtabs.sh
  6. 16 0
      bin/zippem.sh

+ 2 - 4
.gitignore

@@ -3,9 +3,8 @@
 $RECYCLE.BIN
 /*.orig
 /ass/*.plist
-/bin/*.app
-/bin/*.exe
-/bin/*.sh
+/bin/*
+!/bin/*.sh
 /*load
 
 Thumbs.db
@@ -63,7 +62,6 @@ x86/
 [Aa][Rr][Mm]/
 [Aa][Rr][Mm]64/
 bld/
-[Bb]in/
 [Oo]bj/
 [Ll]og/
 

+ 4 - 0
bin/editconf.sh

@@ -0,0 +1,4 @@
+#!/bin/bash
+c0nf="$HOME/Library/Containers/com.jemoeder.lief.str0kem/Data/Library/Application Support/str0kem/str0kem.conf"
+vim "$c0nf"
+killall str0kem

+ 7 - 0
bin/findbom.sh

@@ -0,0 +1,7 @@
+#!/bin/bash
+relpath=$(dirname "${BASH_SOURCE[0]}")
+if [ "$relpath" != "." ]; then
+	echo "Better run this shit from the 'bin' dir y0"
+	exit 1
+fi
+find ../ \( -name "*.h" -o -name "*.c" -o -name "*.m" -o -name "*.cpp" \) -exec hexdump -C "{}" \; | grep -H '^00000000  ef bb bf'

+ 3 - 0
bin/logtail.sh

@@ -0,0 +1,3 @@
+#!/bin/bash
+l0g="$HOME/Library/Containers/com.jemoeder.lief.str0kem/Data/Library/Application Support/str0kem/str0kem.log"
+tail -5f "$l0g"

+ 7 - 0
bin/trimtabs.sh

@@ -0,0 +1,7 @@
+#!/bin/bash
+relpath=$(dirname "${BASH_SOURCE[0]}")
+if [ "$relpath" != "." ]; then
+	echo "Better run this shit from the 'bin' dir y0"
+	exit 1
+fi
+find ../ \( -name "*.h" -o -name "*.c" -o -name "*.m" -o -name "*.cpp" \) -exec grep -HrE '^\t+$' "{}" \; | cut -d: -f1 | sort | uniq | xargs sed -i '' 's/^	*$//g'

+ 16 - 0
bin/zippem.sh

@@ -0,0 +1,16 @@
+#!/bin/bash
+relpath=$(dirname "${BASH_SOURCE[0]}")
+if [ "$relpath" != "." ]; then
+	echo "Better run this shit from the 'bin' dir y0"
+	exit 1
+fi
+
+rm -f *.zip 2>/dev/null
+[ ! -d ../release ] && mkdir ../release
+
+zip -r ../release/str0kem-mac.zip str0kem.app
+
+mkdir str0kem
+cp -v str0kem.exe libmysql.dll str0kem
+zip -r ../release/str0kem-win.zip str0kem
+rm -rf str0kem