aboutsummaryrefslogtreecommitdiff
path: root/make_install.sh
diff options
context:
space:
mode:
authorEinhard Leichtfuß <alguien@respiranto.de>2018-12-23 07:06:00 +0100
committerEinhard Leichtfuß <alguien@respiranto.de>2018-12-23 07:06:00 +0100
commita22ff75e023034068d07adae2ebc427607b24b5d (patch)
tree146c797ae2cee3bbe302f3a74467e04014f8c9ae /make_install.sh
parentcbbef9daa26418fd13aaa23cbb97ec0e536ae4e1 (diff)
Simplify and abstract from "$tmp"
- Add input and write to basic.sh to no longer need to know "$tmp" in the calling scripts. Also, - make runnable from outside the directory containing the scripts, - simplify chained grep and sed commands.
Diffstat (limited to 'make_install.sh')
-rwxr-xr-xmake_install.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/make_install.sh b/make_install.sh
index 0a3098c..6a3468d 100755
--- a/make_install.sh
+++ b/make_install.sh
@@ -20,7 +20,10 @@
# along with aur-fd-scripts. If not, see <https://www.gnu.org/licenses/>.
#
-. basic.sh
+script_path="$(realpath "$0")"
+script_dir="${script_path%/*}"
+. "${script_dir}/basic.sh"
+
function main
{
@@ -54,14 +57,16 @@ function main
fi
}
+
function make_install
{
pkgname=dict-freedict-${lang}${ext}
- cp ../sample.install "$tmp"
+ input ../sample.install
replace "%LANG%" "$lang"
replace "%SUFFIX%" "$ext"
- mv "$tmp" ${pkgname}/${pkgname}.install
+ write ${pkgname}/${pkgname}.install
}
+
main "$@"