mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-29 09:35:54 +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
|
||||
set -e
|
||||
# bail on errors and unset variables
|
||||
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"
|
||||
|
||||
echo "* bundle install"
|
||||
bundle install
|
||||
|
||||
# echo "* npm install"
|
||||
# npm install
|
||||
if [[ $(uname) = "Linux" ]]; then
|
||||
if which swiftc >/dev/null 2>/dev/null; then
|
||||
echo "*** swift is installed: $(swift --version)"
|
||||
else
|
||||
echo "*** installing swift"
|
||||
pushd $HOME
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
set -euo pipefail
|
||||
|
||||
if [[ $(uname) = "Linux" ]]; then
|
||||
build_platform_dir="x86_64-unknown-linux"
|
||||
build_platform_dir="x86_64-unknown-linux"
|
||||
else
|
||||
build_platform_dir="x86_64-apple-macosx"
|
||||
build_platform_dir="x86_64-apple-macosx"
|
||||
fi
|
||||
|
||||
pushd "gensite" >/dev/null
|
||||
|
|
|
|||
Loading…
Reference in a new issue