nixpkgs/pkgs/desktops/kde-4.8/l10n/l10n-manifest.sh
Yury G. Kudryashov c65ada160e KDE-4.8.1
* Switch to .tar.xz.
* Update fixed-output derivations hashes.
* Add kde-base-artwork (ksplashx themes)

svn path=/nixpkgs/trunk/; revision=32874
2012-03-08 06:53:44 +00:00

33 lines
730 B
Bash
Executable file

#!/bin/sh
# Usage: download kde-l10n to $dir, then run
# $0 $dir
dir=$1
if [[ ! -d "${dir}" ]]; then
echo "${dir} is not a directory (or doesn't exist)!" >&2
exit 1
fi
release=$(ls "${dir}"/kde-l10n-en_GB-*.tar.xz | \
sed -e 's/.*en_GB-//' -e 's/\.tar\.xz//')
echo "Detected release ${release}" >&2
exec > "manifest-${release}.nix"
echo "["
for i in `cd "${dir}"; ls kde-l10n-*-${release}.tar.xz`; do
lang=${i%-${release}.tar.xz}
lang=${lang#kde-l10n-}
echo -n "${lang}.. " >&2
hash=$(nix-hash --type sha256 --flat --base32 "${dir}/${i}")
echo "{"
echo " lang = \"${lang}\";"
echo " saneName = \"$(echo $lang | sed s^@^_^g)\";"
echo " sha256 = \"${hash}\";"
echo "}"
echo $hash >&2
done
echo "]"