mirror of
https://github.com/YunoHost/ynh-dev.git
synced 2024-09-03 20:05:59 +02:00
Compatibility changes to support Windows/Busybox:
* don't rely on symbolic links on the host * apply a slight change to a sed command (no "\n")
This commit is contained in:
parent
28889a2532
commit
f2a20e3c7d
1 changed files with 7 additions and 7 deletions
14
ynh-dev
Executable file → Normal file
14
ynh-dev
Executable file → Normal file
|
@ -98,7 +98,7 @@ elif [ "$1" = "create-env" ]; then
|
||||||
|
|
||||||
# Get YunoHost Vagrantfile
|
# Get YunoHost Vagrantfile
|
||||||
git clone -b master https://github.com/YunoHost/Vagrantfile vagrant
|
git clone -b master https://github.com/YunoHost/Vagrantfile vagrant
|
||||||
ln -s vagrant/Vagrantfile Vagrantfile
|
cp vagrant/Vagrantfile Vagrantfile
|
||||||
|
|
||||||
# Get YunoHost dev tools
|
# Get YunoHost dev tools
|
||||||
git clone -b master https://github.com/YunoHost/ynh-dev ynh-dev-tools
|
git clone -b master https://github.com/YunoHost/ynh-dev ynh-dev-tools
|
||||||
|
@ -163,17 +163,17 @@ elif [ "$1" = "run" ]; then
|
||||||
git pull
|
git pull
|
||||||
popd &> /dev/null
|
popd &> /dev/null
|
||||||
rm ./Vagrantfile
|
rm ./Vagrantfile
|
||||||
ln -s vagrant/Vagrantfile Vagrantfile
|
cp vagrant/Vagrantfile Vagrantfile
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Adapt vagrantfile
|
# Adapt vagrantfile
|
||||||
sed -i "/ ### END AUTOMATIC YNH-DEV ###/ i \\
|
sed -i "/ ### END AUTOMATIC YNH-DEV ###/ i \\
|
||||||
config.vm.define \"${VMNAME}\" do |${VMNAME}| \
|
config.vm.define \"${VMNAME}\" do |${VMNAME}| \\
|
||||||
\n ${VMNAME}.vm.box = \"yunohost/jessie-${VERSION}\" \
|
${VMNAME}.vm.box = \"yunohost/jessie-${VERSION}\" \\
|
||||||
\n ${VMNAME}.vm.network :private_network, ip: \"${IP}\" \
|
${VMNAME}.vm.network :private_network, ip: \"${IP}\" \\
|
||||||
\n end \
|
end \\
|
||||||
\n" ./Vagrantfile
|
" ./Vagrantfile
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run VM
|
# Run VM
|
||||||
|
|
Loading…
Add table
Reference in a new issue