会同县做网站,wordpress使用qq登录,哪家做网站好,wordpress 手机 插件一、设置PATH环境变量的方法,建议用~/.bash_profile的方法#xff0c;不然在ssh登录的时候可能没有设置PATH. 二、下面的完整的脚本#xff0c;里面的echo export PATH$build_toolchain_path:\$PATH $HOME/.bashrc 就是把交叉编译路径写写到.bashrc设置…
一、设置PATH环境变量的方法,建议用~/.bash_profile的方法不然在ssh登录的时候可能没有设置PATH. 二、下面的完整的脚本里面的echo export PATH$build_toolchain_path:\$PATH $HOME/.bashrc 就是把交叉编译路径写写到.bashrc设置PATH环境变量。
#!/bin/bash# command to install toolchain in the dirname which you Specified.
# source ./env_install_toolchain.sh dirname
INSTALL_TARGET_DIR
toolchain_crosspwd
toolchain_cross$(basename ${toolchain_cross})
if [ -n $1 ]; thenif [ -d $1 ]; thenINSTALL_TARGET_DIR$1build_toolchain_path${INSTALL_TARGET_DIR}/$toolchain_cross/binelseecho error: not found dir $1echo command format: source $0 [dirname]echo [dirname] is optionalreturn 1fi
elsebuild_toolchain_path${PWD}/bin
fi# default 1
selectopt1case $selectopt in0)if [ -n $INSTALL_TARGET_DIR ]; thensudo cp -rfa $PWD $INSTALL_TARGET_DIRfisudo echo export PATH$build_toolchain_path/:\$PATH /etc/profilesource /etc/profile;;1)if [ -n $INSTALL_TARGET_DIR ]; thencp -rfa $PWD $INSTALL_TARGET_DIRficmdsedsed -i /^export PATH.*${toolchain_cross}\/bin/d \$HOME\/.bashrceval $cmdsedecho export PATH$build_toolchain_path:\$PATH $HOME/.bashrcsource $HOME/.bashrccmdsedsed -i /^export PATH.*${toolchain_cross}\/bin/d \$HOME\/.bash_profileeval $cmdsedecho export PATH$build_toolchain_path:\$PATH $HOME/.bash_profilesource $HOME/.bash_profile;;*)echo Please check input.;;
esac三、运行完上面的脚本之后的效果。