1
0
Fork 0
mirror of synced 2024-11-17 06:25:35 -05:00

Fix sh script

This commit is contained in:
George Muraru 2020-01-20 10:26:31 +02:00
parent 46195e4ca4
commit 32dc236a00

View file

@ -16,9 +16,10 @@ source $1/my_configs.vim
catch
endtry"
if [ $2 == "--all" ]; then
USERS=($(ls -l /home | awk '{if(NR>1)print $9}'))
for user in ${USERS[*]}; do
if [ "$2" = "--all" ]; then
USERS=$(ls -l /home | awk '{if(NR>1)print $9}')
for user in $USERS; do
homepath=$(eval echo "~$user")
IFS=''
echo $VIMRC > ${homepath}/.vimrc
@ -28,10 +29,10 @@ if [ $2 == "--all" ]; then
echo "Installed the Ultimate Vim configuration successfully! Enjoy :-)"
exit 0
else
SELECTED_USERS=(${@:2})
echo "Selected users: ${SELECTED_USERS[@]}"
for user in ${SELECTED_USERS[@]}; do
homepath=$(eval echo "~$user")
SELECTED_USERS=${@:2}
echo "Selected users: $SELECTED_USERS"
for user in $SELECTED_USERS; do
homepath=$(eval echo "~/$user")
IFS=''
echo $VIMRC > ${homepath}/.vimrc
unset IFS