From 92d20f8fd6b0e8036da83abe8e3c4e98b1e8e029 Mon Sep 17 00:00:00 2001 From: Einhard Leichtfuß Date: Sun, 23 Dec 2018 16:42:28 +0100 Subject: Use $lang instead of $pkgname for dirnames --- TODO | 6 ++++++ make_install.sh | 5 +++-- update.sh | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index 6aaf7d1..8647680 100644 --- a/TODO +++ b/TODO @@ -4,6 +4,8 @@ TODO file for aur-fd-scripts * Move dictd make dependency to freedict-tools. * Use updpkgsums from pacman-contrib. * (Better) error handling. +* Allow for different licenses per package. +* Avoid looping over all packages when only one is to be updated. * [consider] Unify the different sample.PKGBUILDs. * [consider] Split off a (bash) configuration file. @@ -12,5 +14,9 @@ TODO file for aur-fd-scripts * Increase / keep pkgrel if the version does not increase. `- `keep' should be a non-default option. * Allow for other maintainers than myself. +* Set up directory structure if not existing. * [consider] Notify on checksum change (should not happen unless version numbers change). + +[NON-FUNCTIONAL] +* Be consistent in quoting. diff --git a/make_install.sh b/make_install.sh index 359989c..53ec43c 100755 --- a/make_install.sh +++ b/make_install.sh @@ -60,7 +60,8 @@ function main # Create the install file. # -# requires: $PWD == +# requires: $lang, $ext to be set; +# $PWD == / # function make_install { @@ -69,7 +70,7 @@ function make_install input "${script_dir}/sample.install" replace "%LANG%" "$lang" replace "%SUFFIX%" "$ext" - write "${pkgname}/${pkgname}.install" + write "${lang}/${pkgname}.install" } diff --git a/update.sh b/update.sh index b78e062..5ba1556 100755 --- a/update.sh +++ b/update.sh @@ -118,7 +118,7 @@ function main # Update PKGBUILD and .SRCINFO # # requires: $lang, $ext, $type, $ver, $convver to be set; -# $PWD == // +# $PWD == // # function update { @@ -172,7 +172,7 @@ function handle_all for lang in ${langs[@]} do - cd dict-freedict-${lang}${ext} || exit 1 + cd $lang || exit 1 $nopull || git pull -q pkgver="$(sed -En 's/\s*pkgver\s*=\s*(.+)\s*/\1/p' .SRCINFO)" data="$(jq -r ".[] | select(.name == \"${lang}\") | .releases[] | select(.platform==\"$platform\")" ../../freedict-database.json)" @@ -226,7 +226,7 @@ function handle_all_vcs for lang in ${vcs_langs[@]} do - cd dict-freedict-${lang}${ext} || exit 1 + cd $lang || exit 1 $nopull || git pull -q pkgver="$(sed -En 's/\s*pkgver\s*=\s*(.+)\s*/\1/p' .SRCINFO)" makepkg --nobuild --nodeps > /dev/null 2>&1 -- cgit v1.2.3