diff --git a/configure.sh b/configure.sh index cb4e16e..8e0eb2d 100755 --- a/configure.sh +++ b/configure.sh @@ -6,7 +6,7 @@ userAddress=`echo $HOME` # 指定安装地址 若不存在则建立 objectAddress="/usr/local/sbin/shell-scripts" if [[ ! -d $objectAddress ]]; then - mkdir $objectAddress + sudo mkdir $objectAddress fi # 添加安装路径到环境变量中 首先获取当前的环境变量 若安装路径已存在于环境变量中则跳过 否则添加安装地址到环境变量中 allPATH=`echo $PATH` @@ -49,7 +49,7 @@ for element in ${scriptName[@]}; do #若链接不存在 则建立 if [[ ! -L ${objectAddress}/${objectName} ]]; then printf "creating links for " ${objectName} "... " - ln -s ${folderAddress}/${element} ${objectAddress}/${objectName} + sudo ln -s ${folderAddress}/${element} ${objectAddress}/${objectName} printf "done\n" fi fi