From 1aff83904cffc5a8c3ed556b0ca326b149531000 Mon Sep 17 00:00:00 2001 From: 6543 Date: Mon, 7 May 2018 01:30:50 +0200 Subject: [PATCH] source cant use variables (p3) --- autogen.sh | 27 +++++++++++++++++++++++++++ src/remaster.sh | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 0ca8a58..6cce94d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -35,6 +35,33 @@ function build() { } +function set_rootdir() { + sed -i "s//$1/g" build/usr/bin/remaster + for i in proj func mods; do + sed -i "s//$1/g" build/usr/lib/remaster/$i/* + done +} +function set_libdir() { + sed -i "s//$1/g" build/usr/bin/remaster + for i in proj func mods; do + sed -i "s//$1/g" build/usr/lib/remaster/$i/* + done +} + +function debug() { + clean + build + set_rootdir "`pwd`/build" + set_libdir "`pwd`/build/usr/lib/remaster" +} + +function install() { + clean + build + set_rootdir "" + set_libdir "/usr/lib/remaster" + #cp -f -r build/* / +} case "$1" in install) diff --git a/src/remaster.sh b/src/remaster.sh index bae0df4..f4b85e3 100755 --- a/src/remaster.sh +++ b/src/remaster.sh @@ -10,7 +10,7 @@ #set functions [ -d "" ] || { - echo "ERROR functions not found" + echo "ERROR Librarys not found" exit 1 }