cosmic/skel/.efingerd

28 lines
715 B
Bash
Executable File

#!/bin/sh
# version 1
# $1 = identity of remote user fingering you
# $2 = address of remote machine fingering you
# $3 = name of user being fingered (you!)
# Prints current user's ship roster
printf "Ships registered to user \"%s\"\\n" "$3"
/usr/local/bin/roster "$3" | awk '{$1=">>"; print $0}'
# This portion is maintained for compatability with fellowsh
# a tildeverse/pubnix social network built on fingerd
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
printf "Plan:\\n"
if [ -f "${SCRIPTPATH}/.plan" ]; then
cat "${SCRIPTPATH}/.plan"
else
printf "No Plan.\\n"
fi
printf "Project:\\n"
if [ -f "${SCRIPTPATH}/.project" ]; then
cat "${SCRIPTPATH}/.project"
else
printf "No Project.\\n"
fi