Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
-布谷鸟-
nosqlclient
提交
33985ef3
N
nosqlclient
项目概览
-布谷鸟-
/
nosqlclient
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nosqlclient
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
33985ef3
编写于
5月 08, 2017
作者:
R
rsercano
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
trying to fix tar overlayfs issue
上级
f94d74d9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
274 addition
and
16 deletion
+274
-16
.docker/install-deps.sh
.docker/install-deps.sh
+1
-1
.docker/install-meteor.sh
.docker/install-meteor.sh
+273
-15
未找到文件。
.docker/install-deps.sh
浏览文件 @
33985ef3
...
...
@@ -6,7 +6,7 @@ printf "\n[-] Installing base OS dependencies...\n\n"
apt-get update
-y
apt-get
install
-y
--no-install-recommends
curl ca-certificates bzip2 build-essential numactl python git wget
apt-get
install
-y
--no-install-recommends
curl ca-certificates bzip2 build-essential numactl python git wget
bsdtar
dpkgArch
=
"
$(
dpkg
--print-architecture
|
awk
-F-
'{ print $NF }'
)
"
...
...
.docker/install-meteor.sh
浏览文件 @
33985ef3
...
...
@@ -2,22 +2,280 @@
set
-e
if
[
"
$DEV_BUILD
"
=
true
]
;
then
# if this is a devbuild, we don't have an app to check the .meteor/release file yet,
# so just install the latest version of Meteor
printf
"
\n
[-] Installing the latest version of Meteor...
\n\n
"
curl https://install.meteor.com/ | sh
#!/bin/sh
# This is the Meteor install script!
#
# Are you looking at this in your web browser, and would like to install Meteor?
#
# MAC AND LINUX:
# Just open up your terminal and type:
#
# curl https://install.meteor.com/ | sh
#
# Meteor currently supports:
# - Mac: OS X 10.7 and above
# - Linux: x86 and x86_64 systems
#
# WINDOWS:
# Download the Windows installer from https://install.meteor.com/windows
#
# Meteor currently supports Windows 7, Windows 8.1, Windows Server 2008,
# and Windows Server 2012.
# We wrap this whole script in a function, so that we won't execute
# until the entire script is downloaded.
# That's good because it prevents our output overlapping with curl's.
# It also means that we can't run a partially downloaded script.
# We don't indent because it would be really confusing with the heredocs.
run_it
()
{
# This always does a clean install of the latest version of Meteor into your
# ~/.meteor, replacing whatever is already there. (~/.meteor is only a cache of
# packages and package metadata; no personal persistent data is stored there.)
RELEASE
=
"1.4.4.2"
# Now, on to the actual installer!
## NOTE sh NOT bash. This script should be POSIX sh only, since we don't
## know what shell the user has. Debian uses 'dash' for 'sh', for
## example.
PREFIX
=
"/usr/local"
set
-e
set
-u
# Let's display everything on stderr.
exec
1>&2
UNAME
=
$(
uname
)
# Check to see if it starts with MINGW.
if
[
"
$UNAME
"
">"
"MINGW"
-a
"
$UNAME
"
"<"
"MINGX"
]
;
then
echo
"To install Meteor on Windows, download the installer from:"
echo
"https://install.meteor.com/windows"
exit
1
fi
if
[
"
$UNAME
"
!=
"Linux"
-a
"
$UNAME
"
!=
"Darwin"
]
;
then
echo
"Sorry, this OS is not supported yet via this installer."
echo
"For more details on supported platforms, see https://www.meteor.com/install"
exit
1
fi
if
[
"
$UNAME
"
=
"Darwin"
]
;
then
### OSX ###
if
[
"i386"
!=
"
$(
uname
-p
)
"
-o
"1"
!=
"
$(
sysctl
-n
hw.cpu64bit_capable 2>/dev/null
||
echo
0
)
"
]
;
then
# Can't just test uname -m = x86_64, because Snow Leopard can
# return other values.
echo
"Only 64-bit Intel processors are supported at this time."
exit
1
fi
# Running a version of Meteor older than 0.6.0 (April 2013)?
if
grep
BUNDLE_VERSION /usr/local/bin/meteor
>
/dev/null 2>&1
;
then
echo
"You appear to have a very old version of Meteor installed."
echo
"Please remove it by running these commands:"
echo
"
$
sudo rm /usr/local/bin/meteor"
echo
"
$
sudo rm -rf /usr/local/meteor /usr/local/meteor.old"
echo
"and then run the installer command again:"
echo
"
$
curl https://install.meteor.com/ | sh"
exit
1
fi
PLATFORM
=
"os.osx.x86_64"
elif
[
"
$UNAME
"
=
"Linux"
]
;
then
### Linux ###
LINUX_ARCH
=
$(
uname
-m
)
if
[
"
${
LINUX_ARCH
}
"
=
"i686"
]
;
then
PLATFORM
=
"os.linux.x86_32"
elif
[
"
${
LINUX_ARCH
}
"
=
"x86_64"
]
;
then
PLATFORM
=
"os.linux.x86_64"
else
echo
"Unusable architecture:
${
LINUX_ARCH
}
"
echo
"Meteor only supports i686 and x86_64 for now."
exit
1
fi
# Running a version of Meteor older than 0.6.0 (April 2013) on a dpkg system?
if
dpkg
-s
meteor
>
/dev/null 2>&1
;
then
echo
"You appear to have a very old version of Meteor installed."
echo
"Please remove it by running these commands:"
echo
"
$
sudo dpkg -r meteor"
echo
"
$
hash -r"
echo
"and then run the installer command again:"
echo
"
$
curl https://install.meteor.com/ | sh"
exit
1
fi
# Running a version of Meteor older than 0.6.0 (April 2013) on an rpm system?
if
rpm
-q
meteor
>
/dev/null 2>&1
;
then
echo
"You appear to have a very old version of Meteor installed."
echo
"Please remove it by running these commands:"
echo
"
$
sudo rpm -e meteor"
echo
"
$
hash -r"
echo
"and then run the installer command again:"
echo
"
$
curl https://install.meteor.com/ | sh"
exit
1
fi
fi
trap
"echo Installation failed."
EXIT
if
[
-z
$HOME
]
||
[
!
-d
$HOME
]
;
then
echo
"The installation and use of Meteor requires the
\$
HOME environment variable be set to a directory where its files can be installed."
exit
1
fi
# If you already have a tropohouse/warehouse, we do a clean install here:
if
[
-e
"
$HOME
/.meteor"
]
;
then
echo
"Removing your existing Meteor installation."
rm
-rf
"
$HOME
/.meteor"
fi
TARBALL_URL
=
"https://meteorinstall-4168.kxcdn.com/packages-bootstrap/
${
RELEASE
}
/meteor-bootstrap-
${
PLATFORM
}
.tar.gz"
INSTALL_TMPDIR
=
"
$HOME
/.meteor-install-tmp"
TARBALL_FILE
=
"
$HOME
/.meteor-tarball-tmp"
cleanUp
()
{
rm
-rf
"
$TARBALL_FILE
"
rm
-rf
"
$INSTALL_TMPDIR
"
}
# Remove temporary files now in case they exist.
cleanUp
# Make sure cleanUp gets called if we exit abnormally.
trap
cleanUp EXIT
mkdir
"
$INSTALL_TMPDIR
"
# Only show progress bar animations if we have a tty
# (Prevents tons of console junk when installing within a pipe)
VERBOSITY
=
"--silent"
;
if
[
-t
1
]
;
then
VERBOSITY
=
"--progress-bar"
fi
echo
"Downloading Meteor distribution"
# keep trying to curl the file until it works (resuming where possible)
MAX_ATTEMPTS
=
10
RETRY_DELAY_SECS
=
5
set
+e
ATTEMPTS
=
0
while
[
$ATTEMPTS
-lt
$MAX_ATTEMPTS
]
do
ATTEMPTS
=
$((
ATTEMPTS
+
1
))
curl
$VERBOSITY
--fail
--continue-at
-
\
"
$TARBALL_URL
"
--output
"
$TARBALL_FILE
"
if
[
$?
-eq
0
]
then
break
fi
echo
"Retrying download in
$RETRY_DELAY_SECS
seconds..."
sleep
$RETRY_DELAY_SECS
done
set
-e
# bomb out if it didn't work, eg no net
test
-e
"
${
TARBALL_FILE
}
"
bsdtar
-xf
"
$TARBALL_FILE
"
-C
"
$INSTALL_TMPDIR
"
test
-x
"
${
INSTALL_TMPDIR
}
/.meteor/meteor"
mv
"
${
INSTALL_TMPDIR
}
/.meteor"
"
$HOME
"
# just double-checking :)
test
-x
"
$HOME
/.meteor/meteor"
# The `trap cleanUp EXIT` line above won't actually fire after the exec
# call below, so call cleanUp manually.
cleanUp
echo
echo
"Meteor
${
RELEASE
}
has been installed in your home directory (~/.meteor)."
METEOR_SYMLINK_TARGET
=
"
$(
readlink
"
$HOME
/.meteor/meteor"
)
"
METEOR_TOOL_DIRECTORY
=
"
$(
dirname
"
$METEOR_SYMLINK_TARGET
"
)
"
LAUNCHER
=
"
$HOME
/.meteor/
$METEOR_TOOL_DIRECTORY
/scripts/admin/launch-meteor"
if
cp
"
$LAUNCHER
"
"
$PREFIX
/bin/meteor"
>
/dev/null 2>&1
;
then
echo
"Writing a launcher script to
$PREFIX
/bin/meteor for your convenience."
cat
<<
"
EOF
"
To get started fast:
$
meteor create ~/my_cool_app
$
cd ~/my_cool_app
$
meteor
Or see the docs at:
docs.meteor.com
EOF
elif
type sudo
>
/dev/null 2>&1
;
then
echo
"Writing a launcher script to
$PREFIX
/bin/meteor for your convenience."
echo
"This may prompt for your password."
# New macs (10.9+) don't ship with /usr/local, however it is still in
# the default PATH. We still install there, we just need to create the
# directory first.
# XXX this means that we can run sudo too many times. we should never
# run it more than once if it fails the first time
if
[
!
-d
"
$PREFIX
/bin"
]
;
then
sudo mkdir
-m
755
"
$PREFIX
"
||
true
sudo mkdir
-m
755
"
$PREFIX
/bin"
||
true
fi
if
sudo cp
"
$LAUNCHER
"
"
$PREFIX
/bin/meteor"
;
then
cat
<<
"
EOF
"
To get started fast:
$
meteor create ~/my_cool_app
$
cd ~/my_cool_app
$
meteor
Or see the docs at:
docs.meteor.com
EOF
else
cat
<<
EOF
Couldn't write the launcher script. Please either:
(1) Run the following as root:
cp "
$LAUNCHER
" /usr/bin/meteor
(2) Add "
\$
HOME/.meteor" to your path, or
(3) Rerun this command to try again.
Then to get started, take a look at 'meteor --help' or see the docs at
docs.meteor.com.
EOF
fi
else
# download installer script
curl https://install.meteor.com
-o
/tmp/install_meteor.sh
cat
<<
EOF
Now you need to do one of the following:
(1) Add "
\$
HOME/.meteor" to your path, or
(2) Run this command as root:
cp "
$LAUNCHER
" /usr/bin/meteor
Then to get started, take a look at 'meteor --help' or see the docs at
docs.meteor.com.
EOF
fi
# read in the release version in the app
METEOR_VERSION
=
$(
head
$APP_SOURCE_DIR
/.meteor/release |
cut
-d
"@"
-f
2
)
# set the release version in the install script
sed
-i
.bak
"s/RELEASE=.*/RELEASE=
\"
$METEOR_VERSION
\"
/g"
/tmp/install_meteor.sh
trap
- EXIT
}
# install
printf
"
\n
[-] Installing Meteor
$METEOR_VERSION
...
\n\n
"
sh /tmp/install_meteor.sh
fi
\ No newline at end of file
run_it
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录