diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-05-26 22:51:23 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-05-26 22:51:23 -0500 |
commit | 883140073f1dcd29f20f0614246e5d00e505030d (patch) | |
tree | 43c3a1a6610d0335458d5386ad6e51814c1a5ed7 /hscript | |
parent | f74c7b5a93c75e6b7518f2f34f3b662151277c84 (diff) | |
download | horizon-883140073f1dcd29f20f0614246e5d00e505030d.tar.gz horizon-883140073f1dcd29f20f0614246e5d00e505030d.tar.bz2 horizon-883140073f1dcd29f20f0614246e5d00e505030d.tar.xz horizon-883140073f1dcd29f20f0614246e5d00e505030d.zip |
hscript: Make --keys-dir relative
Diffstat (limited to 'hscript')
-rw-r--r-- | hscript/script_e.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/hscript/script_e.cc b/hscript/script_e.cc index 8c857d7..a05d41e 100644 --- a/hscript/script_e.cc +++ b/hscript/script_e.cc @@ -530,14 +530,13 @@ bool Script::execute() const { output_info("internal", "initialising APK"); if(opts.test(Simulate)) { std::cout << "/sbin/apk --root " << targetDirectory() << " --initdb " - << "--keys-dir " << targetDirectory() << "/etc/apk/keys add" - << std::endl; + << "--keys-dir " << "etc/apk/keys add" << std::endl; } #ifdef HAS_INSTALL_ENV else { if(run_command("/sbin/apk", {"--root", targetDirectory(), "--initdb", "--keys-dir", - targetDirectory() + "/etc/apk/keys", "add"}) != 0) { + "etc/apk/keys", "add"}) != 0) { EXECUTE_FAILURE("pkginstall"); return false; } @@ -553,17 +552,14 @@ bool Script::execute() const { } std::cout << "apk --root " << targetDirectory() << " --keys-dir " - << targetDirectory() << "/etc/apk/keys" << " update" - << std::endl; + << "etc/apk/keys" << " update" << std::endl; std::cout << "apk --root " << targetDirectory() << " --keys-dir " - << targetDirectory() << "/etc/apk/keys" << " add " - << pkg_list.str() << std::endl; + << "etc/apk/keys" << " add " << pkg_list.str() << std::endl; } #ifdef HAS_INSTALL_ENV else { - if(run_command("/sbin/apk", - {"--root", targetDirectory(), "--keys-dir", - targetDirectory() + "/etc/apk/keys", "update"}) != 0) { + if(run_command("/sbin/apk", {"--root", targetDirectory(), "--keys-dir", + "etc/apk/keys", "update"}) != 0) { EXECUTE_FAILURE("pkginstall"); return false; } @@ -572,7 +568,7 @@ bool Script::execute() const { params[0] = "--root"; params[1] = targetDirectory(); params[2] = "--keys-dir"; - params[3] = targetDirectory() + "/etc/apk/keys"; + params[3] = "etc/apk/keys"; params[4] = "add"; std::copy(this->internal->packages.begin(), this->internal->packages.end(), |