aboutsummaryrefslogtreecommitdiffstats
path: root/install.c
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2011-05-15 18:48:17 -0700
committerKoushik Dutta <koushd@gmail.com>2011-05-15 18:48:17 -0700
commit20b516a408adebcad06e03f12516e70b8998c38f (patch)
tree6bfe461c3290829a3d10ded2b4473c7362ed1891 /install.c
parent4d5109cfa8a7c6c6bbeca17d353b66b6763caff6 (diff)
downloadbootable_recovery-20b516a408adebcad06e03f12516e70b8998c38f.zip
bootable_recovery-20b516a408adebcad06e03f12516e70b8998c38f.tar.gz
bootable_recovery-20b516a408adebcad06e03f12516e70b8998c38f.tar.bz2
set the env for UPDATE_PACKAGE (the source zip) for update-binary. This allows shell scripts to use the source zip.
Change-Id: Ia8118b31408f687780dd45e14f540a7e76619cba
Diffstat (limited to 'install.c')
-rw-r--r--install.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/install.c b/install.c
index ad2c21d..1ed0465 100644
--- a/install.c
+++ b/install.c
@@ -181,6 +181,7 @@ try_update_binary(const char *path, ZipArchive *zip) {
pid_t pid = fork();
if (pid == 0) {
+ setenv("UPDATE_PACKAGE", path, 1);
close(pipefd[0]);
execv(binary, args);
fprintf(stdout, "E:Can't run %s (%s)\n", binary, strerror(errno));