Skip to content

Commit

Permalink
Merge branch 'gm-fix-parameterized' of github.com:gmuraru/vimrc into …
Browse files Browse the repository at this point in the history
…gmuraru-gm-fix-parameterized
  • Loading branch information
amix committed May 10, 2020
2 parents d895af5 + 32dc236 commit 79ed228
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions install_awesome_parameterized.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ source $1/my_configs.vim
catch
endtry"

if [ $2 == "--all" ]; then
USERS=($(ls /home))
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
Expand All @@ -28,10 +28,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
Expand Down

0 comments on commit 79ed228

Please sign in to comment.