Commit 43216c3b authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

[nayuos] add crew function to install crew automatically

parent a60c6c2d
...@@ -99,7 +99,7 @@ context = ...@@ -99,7 +99,7 @@ context =
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ software_dir }}/scripts/cros_full_build.in template = {{ software_dir }}/scripts/cros_full_build.in
rendered = ${directory:run}/cros_full_build rendered = ${directory:run}/cros_full_build
md5sum = 7adcd29ec9d0f7c56d016a64979968c7 md5sum = 5227b64852644d9874e3f67254f243ef
mode = 0700 mode = 0700
context = context =
key bash_path bin:bash key bash_path bin:bash
......
...@@ -272,6 +272,21 @@ safewrite() { __safewrite dd "\$@" ; } ...@@ -272,6 +272,21 @@ safewrite() { __safewrite dd "\$@" ; }
sudodd() { sudo dd "\$@" ; } sudodd() { sudo dd "\$@" ; }
sudosafewrite() { __safewrite sudodd "\$@" ; } sudosafewrite() { __safewrite sudodd "\$@" ; }
crew() {
if [[ ! -x /usr/local/bin/crew ]] ; then
read -p "Chromebrew is not on this machine; do you want to install it? [Y/n] " -r -n 1 crew_install
echo ""
if [[ ! $crew_install =~ ^[Nn]$ ]] ; then
echo "Fetching installation file..."
curl -Ls https://lab.nexedi.com/nexedi/chromebrew/raw/nexedi/install.sh | bash
else
return 1
fi
else
command crew "$@"
fi
}
# ----- END NayuOS configuration ----- # ----- END NayuOS configuration -----
EOF EOF
fi fi
......
...@@ -26,7 +26,7 @@ recipe = slapos.recipe.template:jinja2 ...@@ -26,7 +26,7 @@ recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg template = ${:_profile_base_location_}/instance.cfg
rendered = ${buildout:directory}/instance.cfg rendered = ${buildout:directory}/instance.cfg
mode = 0644 mode = 0644
md5sum = 7710f787623394511e5bae285b862e95 md5sum = 462a8632f90a121029a90785a62841c4
context = context =
key software_dir :_profile_base_location_ key software_dir :_profile_base_location_
key instance_dir buildout:directory key instance_dir buildout:directory
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment