From f2bdeaed0bcf97a880fe36cfc8a050d1643120b8 Mon Sep 17 00:00:00 2001 From: Soispha Date: Tue, 20 Feb 2024 17:21:42 +0100 Subject: refactor(treewide): Reformat all files with treefmt This includes getting all shellscripts to pass shellcheck. To accomplish this, some old scripts were removed --- hm/soispha/conf/firefox/scripts/extract_cookies.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'hm/soispha/conf/firefox/scripts/extract_cookies.sh') diff --git a/hm/soispha/conf/firefox/scripts/extract_cookies.sh b/hm/soispha/conf/firefox/scripts/extract_cookies.sh index e4eec72c..e3d50d43 100755 --- a/hm/soispha/conf/firefox/scripts/extract_cookies.sh +++ b/hm/soispha/conf/firefox/scripts/extract_cookies.sh @@ -10,7 +10,6 @@ # which means cookies which are kept only in memory ("session cookies") # will not be extracted. You will need an extension to do that. - # USAGE: # # $ extract_cookies.sh > /tmp/cookies.txt @@ -31,20 +30,17 @@ # # B) If you've redirected stdin (with < or |) , then that will be used. - # HISTORY: I believe this is circa 2010 from: # http://slacy.com/blog/2010/02/using-cookies-sqlite-in-wget-or-curl/ # However, that site is down now. # Cleaned up by Hackerb9 (2017) to be more robust and require less typing. - cleanup() { rm -f "$TMPFILE" exit 0 } -trap cleanup EXIT INT QUIT TERM - +trap cleanup EXIT INT QUIT TERM if [ "$#" -ge 1 ]; then SQLFILE="$1" @@ -59,14 +55,13 @@ fi # We have to copy cookies.sqlite, because FireFox has a lock on it TMPFILE=$(mktemp /tmp/cookies.sqlite.XXXXXXXXXX) -cat "$SQLFILE" >> "$TMPFILE" - +cat "$SQLFILE" >>"$TMPFILE" # This is the format of the sqlite database: # CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, name TEXT, value TEXT, host TEXT, path TEXT,expiry INTEGER, lastAccessed INTEGER, isSecure INTEGER, isHttpOnly INTEGER); echo "# Netscape HTTP Cookie File" -sqlite3 -separator $'\t' "$TMPFILE" << EOF +sqlite3 -separator $'\t' "$TMPFILE" <