Generate addon.d script at install time
Change-Id: I9d1beba09d3007de597c80af5245290aa146c94d Signed-off-by: Paul Keith <javelinanddart@bestas.gr>
This commit is contained in:
@@ -49,23 +49,8 @@ function create() {
|
|||||||
cp -r $COMMON/* $OUT/$GARCH/system >> $GLOG
|
cp -r $COMMON/* $OUT/$GARCH/system >> $GLOG
|
||||||
echo "Generating addon.d script" >> $GLOG
|
echo "Generating addon.d script" >> $GLOG
|
||||||
test -d $OUT/$GARCH/system/addon.d || mkdir -p $OUT/$GARCH/system/addon.d
|
test -d $OUT/$GARCH/system/addon.d || mkdir -p $OUT/$GARCH/system/addon.d
|
||||||
test -f $ADDOND && rm -f $ADDOND
|
cp -f addond_head $OUT/$GARCH/system/addon.d
|
||||||
cat $TOP/addond_head > $ADDOND
|
cp -f addond_tail $OUT/$GARCH/system/addon.d
|
||||||
for txt_file in proprietary-files-common proprietary-files-$GARCH; do
|
|
||||||
cat $TOP/$txt_file.txt | while read l; do
|
|
||||||
if [ "$l" != "" ]; then
|
|
||||||
line=$(echo "$l" | sed 's/^-//g')
|
|
||||||
line=${line%%|*}
|
|
||||||
line=${line%%:*}
|
|
||||||
echo "$line" >> $ADDOND.tmp
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
cat $ADDOND.tmp | LC_ALL=C sort | uniq >> $ADDOND
|
|
||||||
rm $ADDOND.tmp
|
|
||||||
cat $TOP/addond_tail >> $ADDOND
|
|
||||||
chmod 755 $ADDOND
|
|
||||||
mv $ADDOND $OUT/$GARCH/system/addon.d/30-gapps.sh
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function zipit() {
|
function zipit() {
|
||||||
|
@@ -63,6 +63,14 @@ ui_print "Extracting files"
|
|||||||
cd /tmp
|
cd /tmp
|
||||||
unzip -o "$ZIP" system/*
|
unzip -o "$ZIP" system/*
|
||||||
cd system
|
cd system
|
||||||
|
ui_print "Generating addon.d file"
|
||||||
|
cat addon.d/addond_head > addon.d/30-gapps.sh
|
||||||
|
for f in `exec_util "find . -type f"`; do
|
||||||
|
line=$(echo "$f" | sed 's/\.\///')
|
||||||
|
echo "$line" >> addon.d/30-gapps.sh
|
||||||
|
done
|
||||||
|
cat addon.d/addond_tail >> addon.d/30-gapps.sh
|
||||||
|
ui_print "Preparing files for copying"
|
||||||
for dirs in $DIRS; do
|
for dirs in $DIRS; do
|
||||||
set_perm 0755 $dir
|
set_perm 0755 $dir
|
||||||
for d in `exec_util "find ./$dir -type d"`; do
|
for d in `exec_util "find ./$dir -type d"`; do
|
||||||
|
Reference in New Issue
Block a user