Misc language fixes

This commit is contained in:
Radon Rosborough 2021-07-04 03:08:34 +00:00
parent 442265a642
commit 7bb2582c6d
4 changed files with 11 additions and 10 deletions

View File

@ -23,16 +23,18 @@ install:
# #
# We could optimize further but I don't feel like it right now. # We could optimize further but I don't feel like it right now.
manual: | manual: |
install -d "${pkg}/opt/qsharp/skel" install -d "${pkg}/opt/qsharp/skel-home"
install -d "${pkg}/opt/qsharp/skel-src"
dotnet new -i Microsoft.Quantum.ProjectTemplates dotnet new -i Microsoft.Quantum.ProjectTemplates
dotnet new console -lang Q# -o main dotnet new console -lang Q# -o main
dotnet run --project main dotnet run --project main
shopt -s dotglob shopt -s dotglob
cp -R * "${HOME}/.dotnet" "${HOME}/.nuget" "${pkg}/opt/qsharp/skel/" cp -R main "${pkg}/opt/qsharp/skel-src/"
rm "${pkg}/opt/qsharp/skel/main/Program.qs" cp -R "${HOME}/.dotnet" "${HOME}/.nuget" "${pkg}/opt/qsharp/skel-home/"
chmod -R a=u,go-w "${pkg}/opt/qsharp/skel" rm "${pkg}/opt/qsharp/skel-src/main/Program.qs"
chmod -R a=u,go-w "${pkg}/opt/qsharp"
manualInstall: | manualInstall: |
wget "https://packages.microsoft.com/config/ubuntu/${ubuntu_ver}/packages-microsoft-prod.deb" wget "https://packages.microsoft.com/config/ubuntu/${ubuntu_ver}/packages-microsoft-prod.deb"
sudo --preserve-env=DEBIAN_FRONTEND apt-get update sudo --preserve-env=DEBIAN_FRONTEND apt-get update
@ -40,7 +42,8 @@ install:
setup: | setup: |
shopt -s dotglob shopt -s dotglob
cp -R /opt/qsharp/skel/* ./ cp -R /opt/qsharp/skel-src/* ./
cp -R /opt/qsharp/skel-home/* "${HOME}/"
main: "main/Main.qs" main: "main/Main.qs"
template: | template: |

View File

@ -9,8 +9,6 @@ name: "ReasonML"
install: install:
prepare: prepare:
apt:
- yarn
npm: npm:
- bs-platform - bs-platform
npm: npm:
@ -31,7 +29,7 @@ install:
pushd "${pkg}/opt/reasonml/skel" pushd "${pkg}/opt/reasonml/skel"
bsb -init . bsb -init .
cat bsconfig.json | jq '.name = "riju-project"' | sponge bsconfig.json cat bsconfig.json | jq '.name = "riju-project"' | sponge bsconfig.json
yarn install npm install
popd popd
main: "main.re" main: "main.re"

View File

@ -17,7 +17,7 @@ install:
cp -R "$HOME/.red" "${pkg}/opt/red/skel/" cp -R "$HOME/.red" "${pkg}/opt/red/skel/"
setup: | setup: |
shopt -s dotglob; cp -R /opt/red/skel/* ./ shopt -s dotglob; cp -R /opt/red/skel/* "${HOME}/"
# https://github.com/red/red/issues/543#issuecomment-25404212 # https://github.com/red/red/issues/543#issuecomment-25404212
repl: | repl: |

View File

@ -419,7 +419,7 @@ EOF`);
parts.unshift(`ubuntu_name="$(lsb_release -cs)"`); parts.unshift(`ubuntu_name="$(lsb_release -cs)"`);
} }
if (parts.join("\n\n").includes("ubuntu_ver")) { if (parts.join("\n\n").includes("ubuntu_ver")) {
parts.unshift(`ubuntu_name="$(lsb_release -rs)"`); parts.unshift(`ubuntu_ver="$(lsb_release -rs)"`);
} }
parts.unshift(`\ parts.unshift(`\
#!/usr/bin/env bash #!/usr/bin/env bash