mirror of
https://github.com/YunoHost/ynh-dev.git
synced 2024-09-03 20:05:59 +02:00
[fix] Bad instruction display in comment
This commit is contained in:
parent
891ec86e5b
commit
aef5aa2fb4
1 changed files with 12 additions and 2 deletions
14
ynh-dev
14
ynh-dev
|
@ -157,6 +157,17 @@ elif [ "$1" = "run" ]; then
|
|||
}
|
||||
done
|
||||
|
||||
# Update Vagrantfile
|
||||
grep "### END AUTOMATIC YNH-DEV ###" ./Vagrantfile &> /dev/null || {
|
||||
pushd ./vagrant &> /dev/null
|
||||
git pull
|
||||
popd &> /dev/null
|
||||
rm ./Vagrantfile
|
||||
ln -s vagrant/Vagrantfile Vagrantfile
|
||||
|
||||
}
|
||||
|
||||
# Adapt vagrantfile
|
||||
sed -i "/ ### END AUTOMATIC YNH-DEV ###/ i \\
|
||||
config.vm.define \"${VMNAME}\" do |${VMNAME}| \
|
||||
\n ${VMNAME}.vm.box = \"yunohost/jessie-${VERSION}\" \
|
||||
|
@ -173,8 +184,7 @@ VERSION as stable, testing or unstable /!\ "
|
|||
|
||||
# Warn user about hosts file
|
||||
IP_LINE="\s\s*${VMNAME}.vm.network\s\s*:private_network,\s*ip:\s*\""
|
||||
IP=$(grep "$IP_LINE" Vagrantfile | sed "s/${IP_LINE}//")
|
||||
IP=${IP::-1}
|
||||
IP=$(grep "$IP_LINE" Vagrantfile | sed "s/${IP_LINE}//" | tr -d '"')
|
||||
echo "/!\ Please add '$IP $DOMAIN' to your /etc/hosts file /!\\"
|
||||
echo "sudo sh -s 'echo \"$IP $DOMAIN\" >> /etc/hosts'"
|
||||
echo ""
|
||||
|
|
Loading…
Add table
Reference in a new issue