Why Nostr? What is Njump?
2024-07-03 00:55:16

npub1mm…0t2pw on Nostr: commit 0ef6fdd28b4b9b959703c42a8bbda5a1240476d7 Author: randymcmillan ...

commit 0ef6fdd28b4b9b959703c42a8bbda5a1240476d7
Author: randymcmillan <[email protected]>
Date: Wed Sep 6 13:32:57 2023 -0400

template/gnostr-fs

template/gnostr-functions

diff --git a/template/gnostr-fs b/template/gnostr-fs
new file mode 100644
index 000000000..20a655b7a
--- /dev/null
+++ b/template/gnostr-fs
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+#
+
+GNOSTR=$(which gnostr)
+
+# Determine size of a file or total size of a directory
+function gnostr-fs() {
+ if du -b /dev/null > /dev/null 2>&1; then
+ local arg=-sbh;
+ else
+ local arg=-sh;
+ fi
+ if [[ -n "$@" ]]; then
+ du $arg -- "$@";
+ else
+ du $arg .[^.]* ./*;
+ fi;
+}
+gnostr-fs
diff --git a/template/gnostr-functions b/template/gnostr-functions
index ee3e8712e..a59fc0ae2 100644
--- a/template/gnostr-functions
+++ b/template/gnostr-functions
@@ -184,20 +184,6 @@ function gnostr-targz() {
echo "${tmpFile}.gz ($((zippedSize / 1000)) kB) created successfully.";
}

-# Determine size of a file or total size of a directory
-function gnostr-fs() {
- if du -b /dev/null > /dev/null 2>&1; then
- local arg=-sbh;
- else
- local arg=-sh;
- fi
- if [[ -n "$@" ]]; then
- du $arg -- "$@";
- else
- du $arg .[^.]* ./*;
- fi;
-}
-
# Use gnostr’s colored diff when available
hash gnostr &>/dev/null;
if [ $? -eq 0 ]; then
Author Public Key
npub1mmkr4haqpvtuzy962ht0sna4pwnawu8nuzzeh478zm8qj4m02r4sp0t2pw