source cant use variables (p3)

This commit is contained in:
6543 2018-05-07 01:30:50 +02:00
parent b6eb652c50
commit 1aff83904c
2 changed files with 28 additions and 1 deletions

View File

@ -35,6 +35,33 @@ function build() {

}

function set_rootdir() {
sed -i "s/<ROOTDIR>/$1/g" build/usr/bin/remaster
for i in proj func mods; do
sed -i "s/<ROOTDIR>/$1/g" build/usr/lib/remaster/$i/*
done
}
function set_libdir() {
sed -i "s/<LIBDIR>/$1/g" build/usr/bin/remaster
for i in proj func mods; do
sed -i "s/<LIBDIR>/$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)

View File

@ -10,7 +10,7 @@

#set functions
[ -d "<LIBDIR>" ] || {
echo "ERROR functions not found"
echo "ERROR Librarys not found"
exit 1
}