fix: check if INSTALL script does not exist
This commit is contained in:
parent
8080299d7d
commit
cdb997215b
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-08-08 16:32+0300\n"
|
"POT-Creation-Date: 2024-08-08 19:07+0300\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -20,8 +20,7 @@ bool __lm_ctx_save_install(lm_ctx_t *ctx, lm_pkg_t *pkg, char *install_path){
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// no need to save empty install script :)
|
if(!exists(install_path, NULL) || is_empty(install_path))
|
||||||
if(is_empty(install_path))
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
char script_name[strlen(pkg->data.name)+15];
|
char script_name[strlen(pkg->data.name)+15];
|
||||||
@ -42,8 +41,7 @@ bool __lm_ctx_save_install(lm_ctx_t *ctx, lm_pkg_t *pkg, char *install_path){
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool __lm_ctx_run_install(char *root, char *install_path) {
|
bool __lm_ctx_run_install(char *root, char *install_path) {
|
||||||
// no need to run empty install script :)
|
if(!exists(install_path, NULL) || is_empty(install_path))
|
||||||
if(is_empty(install_path))
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
char *args[] = {"/bin/bash", install_path, NULL}, *oldpwd = NULL;
|
char *args[] = {"/bin/bash", install_path, NULL}, *oldpwd = NULL;
|
||||||
|
@ -42,7 +42,6 @@ lm_pkg_files_t *lm_package_extract(lm_pkg_t *pkg, char *target){
|
|||||||
if(!__lm_package_extract_check(files->data_file) ||
|
if(!__lm_package_extract_check(files->data_file) ||
|
||||||
!__lm_package_extract_check(files->hashes_file) ||
|
!__lm_package_extract_check(files->hashes_file) ||
|
||||||
!__lm_package_extract_check(files->changes_file) ||
|
!__lm_package_extract_check(files->changes_file) ||
|
||||||
!__lm_package_extract_check(files->install_file) ||
|
|
||||||
!__lm_package_extract_check(files->files_archive)){
|
!__lm_package_extract_check(files->files_archive)){
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user