-
Notifications
You must be signed in to change notification settings - Fork 5
/
INSTALL
49 lines (41 loc) · 1.08 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! bin/bash
#:显示(设置)shell变量
set -e
export LC_ALL=zh_CN.GB2312;export LANG=zh_CN.GB2312
isInstalled=false
if [ -d ~/.PodsRepertory ]
then
isInstalled=true
echo "Already installed podsrepertory"
echo "Update podsrepertory..."
cd ~/.PodsRepertory
hash git >/dev/null && /usr/bin/env git pull --verbose|| {
echo "git not installed"
exit
}
else
echo "Cloning podsrepertory..."
hash git >/dev/null && /usr/bin/env git clone https://github.com/heyuan110/PodsRepertory.git ~/.PodsRepertory || {
echo "git not installed"
exit
}
fi
toPath=~/.cocoapods/repos/master/Specs/
if [ -d "$toPath" ]; then
echo "${toPath} exists"
else
mkdir -p $toPath
echo "create ${toPath} folder successed!"
fi
if $isInstalled ; then
echo "Update podspecs..."
else
echo "Install podspecs..."
fi
cp -rf ~/.PodsRepertory/Podspecs/* $toPath
ls -l ~/.PodsRepertory/Podspecs | grep '^d' | awk '{ print $9 }'
if $isInstalled ; then
echo "Update successfully! please have try 'pod search VExtensions' ~_~!"
else
echo "Installed successfully! please have try 'pod search VExtensions' ~_~!"
fi