mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-07-08 01:50:29 +08:00
try fix when su doesnot exist
This commit is contained in:
parent
320cf6c206
commit
a9132b15ad
@ -33,7 +33,12 @@ while [[ $# > 0 || -n "$ARG" ]]; do
|
||||
done
|
||||
|
||||
# install
|
||||
su $DFS_USER << EOF
|
||||
if command -v su 1>/dev/null; then
|
||||
SUCMD="su $DFS_USER"
|
||||
else
|
||||
SUCMD="bash"
|
||||
fi
|
||||
$SUCMD << EOF
|
||||
cd
|
||||
if [[ ! -f ~/dotfiles/install.sh ]]; then
|
||||
git clone https://gitee.com/dictxiong/dotfiles
|
||||
|
Loading…
x
Reference in New Issue
Block a user