@@ -1139,7 +1139,7 @@ endScript ()
11391139 chmod +x " $rcLocal "
11401140 elif [ $( grep -c " SetupHelper" " $rcLocal " ) == 0 ]; then
11411141 logMessage " adding SetupHelper reinstall script to $rcLocal "
1142- sed -e ' 2d' " $scriptDir /rcS.local" >> $rcLocal
1142+ sed -e ' 1, 2d' " $scriptDir /rcS.local" >> $rcLocal
11431143 fi
11441144 fi
11451145 fi
13261326
13271327# collect command line options
13281328reinstall=false
1329- force=false
13301329deferReboot=false
13311330deferGuiRestart=false
13321331userInteraction=true
@@ -1336,9 +1335,6 @@ while [ $# -gt 0 ]; do
13361335 " reinstall" )
13371336 reinstall=true
13381337 ;;
1339- " force" )
1340- force=true
1341- ;;
13421338 " deferReboot" )
13431339 deferReboot=true
13441340 ;;
@@ -1357,7 +1353,7 @@ while [ $# -gt 0 ]; do
13571353 ;;
13581354 " runFromPm" )
13591355 runFromPm=true
1360- logToConsole=false
1356+ logToConsole=false
13611357 userInteraction=false
13621358 deferReboot=true
13631359 deferGuiRestart=true
@@ -1376,6 +1372,11 @@ done
13761372
13771373# do after logToConsole is enabled/disabled abvove
13781374logMessage " --- starting setup script $packageVersion action: $scriptAction "
1375+ if ! $runFromPm && $logToConsole ; then
1376+ echo
1377+ echo " messages are NOT written to log file - only to console"
1378+ echo
1379+ fi
13791380
13801381# packages that require options to proceed unattended
13811382# must include the optionsRequried flag file in their package directory
@@ -1413,10 +1414,8 @@ fi
14131414# called from reinstallMods at boot time
14141415if $reinstall ; then
14151416 runningAtBoot=true
1416- if $force ; then
1417- scriptAction=' INSTALL'
14181417 # not installed, do it now
1419- elif (( installedVersionNumber == 0 )) ; then
1418+ if (( installedVersionNumber == 0 )) ; then
14201419 scriptAction=' INSTALL'
14211420 # check versions and install only if package version is newer than installed version
14221421 else
@@ -1547,31 +1546,33 @@ if [ $scriptAction != 'UNINSTALL' ]; then
15471546 checkPackageDependencies
15481547
15491548 # create patched files for files with VisibleItemModel for older Venus OS versions
1550- versionStringToNumber " v3.00~14"
1551- if (( $venusVersionNumber < $versionNumber )) ; then
1552- logMessage " patching VisibleItemModel to VisualItemModel in all .qml replacements"
1553- for file in ${fileListVersionIndependent[@]} ; do
1554- baseName=$( basename " $file " )
1555- if ! [[ " $baseName " == * .qml ]]; then continue ; fi
1556- sourceFile=" $versionIndependentFileSet /$baseName "
1557- if ! [ -f " $sourceFile " ]; then continue ; fi
1558- if (( $(grep - c "VisibleItemModel" "$sourceFile ") == 0 )) ; then continue ; fi
1559- sed -e ' s/VisibleItemModel/VisualItemModel/' " $sourceFile " > " $tempFileDir /$baseName "
1560- done
1561- fi
1549+ if ! $installFailed ; then
1550+ versionStringToNumber " v3.00~14"
1551+ if (( $venusVersionNumber < $versionNumber )) ; then
1552+ logMessage " patching VisibleItemModel to VisualItemModel in all .qml replacements"
1553+ for file in ${fileListVersionIndependent[@]} ; do
1554+ baseName=$( basename " $file " )
1555+ if ! [[ " $baseName " == * .qml ]]; then continue ; fi
1556+ sourceFile=" $versionIndependentFileSet /$baseName "
1557+ if ! [ -f " $sourceFile " ]; then continue ; fi
1558+ if (( $(grep - c "VisibleItemModel" "$sourceFile ") == 0 )) ; then continue ; fi
1559+ sed -e ' s/VisibleItemModel/VisualItemModel/' " $sourceFile " > " $tempFileDir /$baseName "
1560+ done
1561+ fi
15621562
1563- # create patched files for all qml files for the change to QtQuick 2
1564- versionStringToNumber " v3.60~18"
1565- if (( $venusVersionNumber >= $versionNumber )) ; then
1566- logMessage " patching QtQuick 1.1 to QtQuick 2 in all .qml replacements"
1567- for file in ${fileListVersionIndependent[@]} ; do
1568- baseName=$( basename " $file " )
1569- if ! [[ " $baseName " == * .qml ]]; then continue ; fi
1570- sourceFile=" $versionIndependentFileSet /$baseName "
1571- if ! [ -f " $sourceFile " ]; then continue ; fi
1572- if (( $(grep - c "QtQuick 1 .1 " "$sourceFile ") == 0 )) ; then continue ; fi
1573- sed -e ' s/QtQuick 1.1/QtQuick 2/' " $sourceFile " > " $tempFileDir /$baseName "
1574- done
1563+ # create patched files for all qml files for the change to QtQuick 2
1564+ versionStringToNumber " v3.60~18"
1565+ if (( $venusVersionNumber >= $versionNumber )) ; then
1566+ logMessage " patching QtQuick 1.1 to QtQuick 2 in all .qml replacements"
1567+ for file in ${fileListVersionIndependent[@]} ; do
1568+ baseName=$( basename " $file " )
1569+ if ! [[ " $baseName " == * .qml ]]; then continue ; fi
1570+ sourceFile=" $versionIndependentFileSet /$baseName "
1571+ if ! [ -f " $sourceFile " ]; then continue ; fi
1572+ if (( $(grep - c "QtQuick 1 .1 " "$sourceFile ") == 0 )) ; then continue ; fi
1573+ sed -e ' s/QtQuick 1.1/QtQuick 2/' " $sourceFile " > " $tempFileDir /$baseName "
1574+ done
1575+ fi
15751576 fi
15761577
15771578 # create the forward and reverse patched files
@@ -1591,7 +1592,7 @@ if [ $scriptAction != 'UNINSTALL' ]; then
15911592 # rather than reverse patching the active file
15921593 # this maintains compatibility with packages installed with older versions of SetupHelper
15931594
1594- if ! $installFailed && ! [ -z " $fileListPatched " ]; then
1595+ if ! $installFailed && ! [ -z " $fileListPatched " ]; then
15951596 patchErrors=()
15961597 for activeFile in ${fileListPatched[@]} ; do
15971598 baseName=$( basename $activeFile )
0 commit comments