X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=brc2;fp=brc2;h=a13574b8bccc7d6070dbe64acc3866c299fc797a;hp=1c57452b1cb82c01cfd33554bc50573ab8eeb82a;hb=07fbcf11a78d2ee20697eb98f5b7eeaa2475f1d1;hpb=d67edcdca8795a4bca116aa532d02dda246a6f53 diff --git a/brc2 b/brc2 index 1c57452..a13574b 100644 --- a/brc2 +++ b/brc2 @@ -484,7 +484,7 @@ _iki-convert() { # can guess based on the existence of the file. We can't be sure # because it could be a file like x.jpg, that we just don't have # in our local repo. - elif [[ ! -f $path && -e $path.mdwn ]]; then + elif [[ ! -f $path && -e $path.mdwn ]]; then path=${path}.mdwn fi j printf "%s\n" "$path" @@ -1975,6 +1975,40 @@ capache() fi } +# wip +apache-apply() { + for file; do + if head -n1 "$file"| grep -E '^#!/bin/bash\b' &>/dev/null; then + { + head -n1 "$file" + cat <<'EOF' +# I follow the GNU license recommendations, +# https://www.gnu.org/licenses/license-recommendations.en.html, which +# recommends that small programs, < 300 lines, such those contained in +# this file or related to this file, be licensed Apache License 2.0. Any +# program which grows large enough, I will switch it to GPL. + +# Copyright 2024 Ian Kelling + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +EOF + tail -n+2 "$file" + } | sponge "$file" + fi + done +} + chrome() { if type -p chromium &>/dev/null; then cmd=chromium