Without a © it is basically public domain, and cannot be subjected to a
license.
If only that could be the case! Unfortunately, under the Berne convention
(signed by almost all the countries in the world), the copyright is
automatic. The "classical" copyright I mean. Where you are basically free
to do nothing. That is why I wanted to add a copyright notice: to not be
told I released proprietary software!
I do not think I am anonymous (there is a link to my Web page on my profile).
But anyway, you are right, there is no reason not to be clear. So here are
again the two scripts with copyright notices:
#!/bin/sh
# Copyright 2018 Loïc Cerf ([email protected])
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# See .
if [ -z "$1" ]
then
printf "Usage: $0 prefs1.js ...
"
exit
fi
printf '# key'
TMP=`mktemp -dt all_prefs.XXXXXX`
trap "rm -r $TMP 2>/dev/null" 0
keys=$TMP/$(seq -s " $TMP/" $#)
values=$TMP/$(seq -s ".val $TMP/" $#).val
mkfifo $TMP/keys $keys $values
# List, in alphabetic order, all keys in at least one input file
grep '^ *user_pref *( *"' "$@" | cut -d \" -f 2 | sort -u | tee $keys >
$TMP/keys &
for k in $keys
do
printf "\t$1"
# List the value in "$1" associated with every key or "undef"
grep '^ *user_pref *( *"' "$1" | cut -d \" -f 2- | tr -d "$(printf \\t)"
| sed -e 's/" *, */'"$(printf \\t)"/ -e 's/ *) *; *$//' -e 's, *) *;
*//.*$,,' | sort -ut "$(printf \\t)" -k 1,1 | join -t "$(printf \\t)" -a 1 -e
undef -o 2.2 $k - > $k.val &
shift
done
printf '
'
paste $TMP/keys $values
#!/usr/bin/awk -f
# Copyright 2018 Loïc Cerf ([email protected])
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# See .
BEGIN { FS = "\t" }
{
val = ""
for (i = 2; i = NF)
print "user_pref(\"" $1 "\", " val ");"
}