-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·57 lines (48 loc) · 1.19 KB
/
build.sh
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
49
50
51
52
53
54
55
56
57
#!/usr/bin/env bash
CDIR="$(cd "$(dirname "$0")" && pwd)"
build_dir=$CDIR/build
while getopts A:K:q option
do
case "${option}"
in
q) QUIET=1;;
A) ARCH=${OPTARG};;
K) KERNEL=${OPTARG};;
esac
done
rm -rf $build_dir
mkdir -p $build_dir
for f in pluginrc.zsh
do
cp $CDIR/$f $build_dir/
done
url='https://github.com/zsh-users/zsh-autosuggestions.git'
home_dir=$build_dir/zsh-autosuggestions
cd $build_dir
[ $QUIET ] && arg_q='-q' || arg_q=''
[ $QUIET ] && arg_s='-s' || arg_s=''
[ $QUIET ] && arg_progress='' || arg_progress='--show-progress'
if [ -x "$(command -v git)" ]; then
git clone $arg_q --depth=1 $url $home_dir
else
echo You should install git: https://duckduckgo.com/?q=install+git+on+linux
fi
#portable_url='https://,,,/.tar.gz'
#tarname=`basename $portable_url`
#
#cd $build_dir
#
#[ $QUIET ] && arg_q='-q' || arg_q=''
#[ $QUIET ] && arg_s='-s' || arg_s=''
#[ $QUIET ] && arg_progress='' || arg_progress='--show-progress'
#
#if [ -x "$(command -v wget)" ]; then
# wget $arg_q $arg_progress $portable_url -O $tarname
#elif [ -x "$(command -v curl)" ]; then
# curl $arg_s -L $portable_url -o $tarname
#else
# echo Install wget or curl
#fi
#
#tar -xzf $tarname
#rm $tarname