diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-03-01 09:36:53 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-03-01 09:36:53 +0200 |
commit | cd43e57b999422980ea95df7f1d03117342e358e (patch) | |
tree | 37afe07c509e7508d8f69edd0fe8793227401023 /bin/ak-follow | |
parent | 4e8f09fcf92eb8de4e39d512ce36b9ed87fbde87 (diff) | |
download | arching-kaos-tools-cd43e57b999422980ea95df7f1d03117342e358e.tar.gz arching-kaos-tools-cd43e57b999422980ea95df7f1d03117342e358e.tar.bz2 arching-kaos-tools-cd43e57b999422980ea95df7f1d03117342e358e.zip |
Simplifying logs
Diffstat (limited to 'bin/ak-follow')
-rwxr-xr-x | bin/ak-follow | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/ak-follow b/bin/ak-follow index 0d6107c..a4ca070 100755 --- a/bin/ak-follow +++ b/bin/ak-follow @@ -1,19 +1,22 @@ #!/bin/bash FOLLOWING="$HOME/.arching-kaos/following" PROGRAM="$(basename $0)" +logit(){ + ak-logthis "$PROGRAM" "$1" "$2" +} if [ ! -z $1 ] then grep $1 $FOLLOWING if [ $? == 0 ] then - ak-logthis "<$(basename $0)>" "[ERROR]" "Already exists" + logit "ERROR" "Already exists" exit 1 fi echo $1 >> $FOLLOWING IPFS=$(ak-ipfs-add $FOLLOWING) if [ $? != 0 ] then - ak-logthis "<$PROGRAM>" "[ERROR]" "Addition failed" + logit "ERROR" "Addition failed" exit 1 fi ak-profile set following $IPFS |