Use sub-directory that will be clean to correct building.
[SquirrelJME.git] / utils-dev / myname.sh
blobca8921889de2c0a577974ea79d30b8af49d2c44d
1 #!/bin/sh
2 # ---------------------------------------------------------------------------
3 # Multi-Phasic Applications: SquirrelJME
4 # Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 # Copyright (C) Multi-Phasic Applications <multiphasicapps.net>
6 # ---------------------------------------------------------------------------
7 # SquirrelJME is under the GNU General Public License v3, or later.
8 # See license.mkd for licensing and copyright information.
9 # ---------------------------------------------------------------------------
10 # DESCRIPTION: Returns the blog friendly username
12 # Force C locale
13 export LC_ALL=C
15 # Directory of this script
16 __exedir="$(dirname -- "$0")"
18 # Current user
19 __myname="$(fossil user default 2> /dev/null)"
20 if [ -z "$__myname" ]
21 then
22 __myname="$USER"
25 # Print it, convert any dots to dashes
26 echo "$__myname" | sed 's/\./-/g'