/usr/share/anyremote/cfg-data/Utils/registry.sh is in anyremote-data 6.3.2-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #!/bin/sh
# Params
# 1. $(TmpDir)
# 2. get/set/rm/keys
# 3. key
# 4. (optional) value
REGISTRY=anyremote.registry
if [ "x$1" = "x" ] || [ "x$2" = "x" ] || [ "x$3" = "x" ]; then
exit 1;
fi
if [ ! -d "$1" ]; then
mkdir "$1";
fi;
if [ ! -f "$1/$REGISTRY" ]; then
touch "$1/$REGISTRY";
fi;
if [ "x$2" = "xset" ] && [ "x$4" = "x" ]; then
exit 1;
fi;
if [ "x$2" = "xset" ]; then
grep -v "^$3=" $1/$REGISTRY > $1/$REGISTRY.tmp
mv $1/$REGISTRY.tmp $1/$REGISTRY
echo "$3=$4" >> $1/$REGISTRY
exit 0;
fi;
if [ "x$2" = "xget" ]; then
VALUE=`grep "^$3=" $1/$REGISTRY|cut -f 2 -d '=' 2> /dev/null`
echo $VALUE
exit 0;
fi;
if [ "x$2" = "xrm" ]; then
grep -v "^$3=" $1/$REGISTRY > $1/$REGISTRY.tmp
mv $1/$REGISTRY.tmp $1/$REGISTRY
exit 0;
fi;
if [ "x$2" = "xkeys" ]; then
cat $1/$REGISTRY|cut -f 2 -d '='
exit 0;
fi;
exit 1;
|