aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-follow
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ak-follow')
-rwxr-xr-xbin/ak-follow7
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