X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Ffunctions.sh;h=6572a48656192f469236c298ed7b145335247dad;hb=a83016b3ed6efc45f499dac88e06de66a1004611;hp=dafa0c4f40bdd6318a9669578a65ac6268b664e6;hpb=1d8c61bacd475b2f930847330ba10203ba4186a2;p=feisty_meow.git diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index dafa0c4f..6572a486 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -80,6 +80,15 @@ if [ -z "$skip_all" ]; then IFS="$HOLDIFS" } + # when passed a list of things, this will return the unique items from that list as an echo. + function uniquify() + { + # do the uniquification: split the space separated items into separate lines, then + # sort the list, then run the uniq tool on the list. results will be packed back onto + # one line when invoked like: local fredlist="$(uniquify a b c e d a e f a e d b)" + echo $* | tr ' ' '\n' | sort | uniq + } + # sets the variable in parameter 1 to the value in parameter 2, but only if # that variable was undefined. function set_var_if_undefined() @@ -308,7 +317,7 @@ if [ -z "$skip_all" ]; then # information for su. # get the x authority info for our current user. - source "$FEISTY_MEOW_SCRIPTS/x_win/get_x_auth.sh" + source "$FEISTY_MEOW_SCRIPTS/security/get_x_auth.sh" if [ -z "$X_auth_info" ]; then # if there's no authentication info to pass along, we just do a normal su.