diff options
author | davidovski <david@davidovski.xyz> | 2022-02-20 14:32:34 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-02-20 14:32:34 +0000 |
commit | 5e64673025351660b27ad61e215ef38a8f033c85 (patch) | |
tree | 87f8f11c38a447835e546fc8c579308e88d4ebee /src/install.sh | |
parent | 8f02115e50573be0a5c6653f2a4a2bb6d7459911 (diff) |
added bootstrapping
Diffstat (limited to 'src/install.sh')
-rw-r--r-- | src/install.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/install.sh b/src/install.sh index 6c02fab..c73a202 100644 --- a/src/install.sh +++ b/src/install.sh @@ -45,6 +45,25 @@ total_filecount() { echo $count } +run_postinstall () { + postinstall="${SYSROOT}/var/lib/xipkg/postinstall" + if [ -d $postinstall ]; then + for file in $(ls $postinstall/*.sh); do + f=$(basename $file) + + # run the postinstall file + # + chmod 755 $file + [ "${SYSROOT}" = "/" ] && + sh "/var/lib/xipkg/postinstall/$f" && + rm $file && + printf "${GREEN}run postinstall for $f!\n" + done + rmdir $postinstall + fi +} + + install () { local packages=$@ @@ -70,5 +89,6 @@ install () { files_files="$files_files $filelist" done wait_for_extract $total ${files_files} + run_postinstall fi } |