#!/bin/sh MY_PATH="`dirname \"$0\"`" # relative MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized bootscripts="" check_dir_exists() { if [ ! -d "$*" ]; then echo "\n" echo "==============================================================" echo " 文件夹 $* 不存在! " echo "==============================================================\n" exit 2 fi } check_file_exists() { if [ ! -f "$*" ]; then echo "\n" echo "==============================================================" echo " 文件 $* 不存在! " echo "==============================================================\n" exit 2 fi } versionpath="" versionpath=$MY_PATH"/active.txt" # echo $versionpath line="" version=$(cat $versionpath) version=`echo ${version} | sed -e 's/^[ \t]*//g' -e 's/^[ \t]*$//g'` if [ -z "$version" ]; then echo "\n" echo "==============================================================" echo " 文件 ${versionpath} 不存在或内容为空! " echo "==============================================================\n" exit 1 fi if [ "$(gsettings get com.deepin.dde.dock hide-mode)" != "'keep-hidden'" ]; then gsettings set com.deepin.dde.dock hide-mode keep-hidden fi # add library search path LIBDIR=${MY_PATH}"/"${version}"/bin" check_dir_exists ${LIBDIR} bootscripts=$LIBDIR"/spshellstart.sh" echo $bootscripts chmod 766 $bootscripts if [ $# -eq 0 ] then sudo $bootscripts --autotest else # echo $# sudo $bootscripts $* fi