mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 10:21:04 +02:00
use find_executable() to find scripts
Origin commit data
------------------
Commit: 05a3384959
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-12-06 (Sun, 06 Dec 2020)
Origin message was:
------------------
- use find_executable() to find scripts
This commit is contained in:
@@ -653,7 +653,8 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
ofgwrite will copy this tarball to new rootfs.
|
||||
It's untared at first start of new image.
|
||||
*/
|
||||
my_system(3, TARGET_PREFIX "/bin/backup.sh", "/tmp", "backup_flash"); // file ending is set by backup script;
|
||||
std::string backup_sh = find_executable("backup.sh");
|
||||
my_system(3, backup_sh.c_str(), "/tmp", "backup_flash"); // file ending is set by backup script;
|
||||
hintBox.hide();
|
||||
}
|
||||
|
||||
@@ -765,10 +766,10 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
}
|
||||
else // not image, install
|
||||
{
|
||||
const char install_sh[] = TARGET_PREFIX "/bin/install.sh";
|
||||
dprintf(DEBUG_NORMAL, "[update] calling %s %s %s\n",install_sh, g_settings.update_dir.c_str(), filename.c_str() );
|
||||
std::string install_sh = find_executable("install.sh");
|
||||
dprintf(DEBUG_NORMAL, "[update] calling %s %s %s\n", install_sh.c_str(), g_settings.update_dir.c_str(), filename.c_str() );
|
||||
#ifndef DRYRUN
|
||||
my_system(3, install_sh, g_settings.update_dir.c_str(), filename.c_str());
|
||||
my_system(3, install_sh.c_str(), g_settings.update_dir.c_str(), filename.c_str());
|
||||
#endif
|
||||
showGlobalStatus(100);
|
||||
ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_FLASHUPDATE_READY);
|
||||
|
Reference in New Issue
Block a user