Merge remote-tracking branch 'ni/master'

This commit is contained in:
lassulus 2020-03-17 21:04:36 +01:00
commit c2685109c0
3 changed files with 20 additions and 14 deletions

View File

@ -24,7 +24,12 @@ pkgs.writeDashBin "irc-announce" ''
# echo2 and cat2 are used output to both, stdout and stderr
# This is used to see what we send to the irc server. (debug output)
echo2() { echo "$*"; echo "$*" >&2; }
cat2() { (read x ; echo "$x" ; echo "$x" >&2) }
cat2() {
while read -r line; do
echo "$line"
echo "$line" >&2
done
}
# privmsg_cat transforms stdin to a privmsg
privmsg_cat() { awk '{ print "PRIVMSG "ENVIRON["IRC_CHANNEL"]" :"$0 }'; }

View File

@ -31,18 +31,19 @@
};
};
stockholm.file = toString ../.;
stockholm-version.pipe = toString (pkgs.writeDash "${name}-version" ''
set -efu
cd ${lib.escapeShellArg stockholm.file}
V=$(${pkgs.coreutils}/bin/date +%y.%m)
if test -d .git; then
V=$V.git.$(${pkgs.git}/bin/git describe --always --dirty)
case $V in (*-dirty)
V=$V@''${HOSTNAME-$(${pkgs.nettools}/bin/hostname)}
esac
fi
printf %s "$V"
'');
stockholm-version.pipe =
toString (pkgs.writers.writeDash "${name}-version" ''
set -efu
cd ${lib.escapeShellArg stockholm.file}
V=$(${pkgs.coreutils}/bin/date +%y.%m)
if test -d .git; then
V=$V.git.$(${pkgs.git}/bin/git describe --always --dirty)
case $V in (*-dirty)
V=$V@''${HOSTNAME-$(${pkgs.nettools}/bin/hostname)}
esac
fi
printf %s "$V"
'');
};
source ={ test }: lib.evalSource [

@ -1 +1 @@
Subproject commit f1b7112ac3cbe090e96f2c82c525b6db69b82034
Subproject commit ed9fc6658226b1525bc008205d76276f0054c6c5