mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
Update bootstrap to install Swift on Linux
This commit is contained in:
parent
4626731919
commit
bc6fc8bb68
2 changed files with 20 additions and 13 deletions
|
|
@ -1,16 +1,23 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
# bail on errors
|
# bail on errors and unset variables
|
||||||
set -e
|
set -euo pipefail
|
||||||
|
|
||||||
# export PATH="$HOME/.rbenv/shims:$PATH"
|
SWIFT_VERSION=5.1.3
|
||||||
|
SWIFT_DIR=swift-$SWIFT_VERSION-RELEASE/swift-$SWIFT_VERSION-RELEASE-ubuntu18.04
|
||||||
|
SWIFT_FILENAME=$SWIFT_DIR.tar.gz
|
||||||
|
|
||||||
echo "*** bootstrap samhuri.net"
|
if [[ $(uname) = "Linux" ]]; then
|
||||||
|
if which swiftc >/dev/null 2>/dev/null; then
|
||||||
echo "* bundle install"
|
echo "*** swift is installed: $(swift --version)"
|
||||||
bundle install
|
else
|
||||||
|
echo "*** installing swift"
|
||||||
# echo "* npm install"
|
pushd $HOME
|
||||||
# npm install
|
wget https://swift.org/builds/swift-$SWIFT_VERSION-release/ubuntu1804/$SWIFT_FILENAME
|
||||||
|
tar xzf $SWIFT_FILENAME
|
||||||
|
echo "export PATH=\"\$HOME/$SWIFT_DIR/usr/bin:\$PATH\"" >> $HOME/.bashrc
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "*** done"
|
echo "*** done"
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
if [[ $(uname) = "Linux" ]]; then
|
if [[ $(uname) = "Linux" ]]; then
|
||||||
build_platform_dir="x86_64-unknown-linux"
|
build_platform_dir="x86_64-unknown-linux"
|
||||||
else
|
else
|
||||||
build_platform_dir="x86_64-apple-macosx"
|
build_platform_dir="x86_64-apple-macosx"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd "gensite" >/dev/null
|
pushd "gensite" >/dev/null
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue