24
24
fi
25
25
26
26
clone_command () {
27
- if git clone $clone_url $dir ; then
27
+ if git clone " $clone_url " " $dir " ; then
28
28
echo " Cloned Popcorn Time successfully"
29
29
else
30
30
echo " Popcorn Time encountered an error and could not be cloned"
@@ -33,16 +33,16 @@ clone_command() {
33
33
}
34
34
35
35
if [ -e " .git/config" ]; then
36
- dat=$( grep url .git/config)
37
- case $dat in * popcorn* )
36
+ dat=" $( grep url .git/config) "
37
+ case " $dat " in * popcorn* )
38
38
echo " You appear to be inside of a Popcorn Time repository already, not cloning"
39
39
clone_repo=" False"
40
40
;;
41
41
* )
42
42
try=" True"
43
43
tries=0
44
44
while [ " $try " = " True" ]; do
45
- read -p " Looks like we are inside a git repository, do you wish to clone inside it? (yes/no) [no] " rd_cln
45
+ read -r - p " Looks like we are inside a git repository, do you wish to clone inside it? (yes/no) [no] " rd_cln
46
46
if [ -z " $rd_cln " ]; then
47
47
rd_cln=' no'
48
48
fi
@@ -57,7 +57,7 @@ if [ -e ".git/config" ]; then
57
57
fi
58
58
done
59
59
if [ " $rd_cln " = " no" ]; then
60
- echo " You appear to be inside of a Popcorn Time repository already, not cloning"
60
+ echo " Not cloning"
61
61
clone_repo=" False"
62
62
else
63
63
echo " You've chosen to clone inside the current directory"
@@ -67,7 +67,7 @@ if [ -e ".git/config" ]; then
67
67
fi
68
68
if [ " $clone_repo " = " True" ]; then
69
69
echo " Cloning Popcorn Time"
70
- read -p " Where do you wish to clone Popcorn Time to? [popcorn] " dir
70
+ read -r - p " Where do you wish to clone Popcorn Time to? [popcorn] " dir
71
71
if [ -z " $dir " ]; then
72
72
dir=' popcorn'
73
73
elif [ " $dir " = " /" ]; then
@@ -80,7 +80,7 @@ if [ "$clone_repo" = "True" ]; then
80
80
try=" True"
81
81
tries=0
82
82
while [ " $try " = " True" ]; do
83
- read -p " Directory $dir already exists, do you wish to delete it and redownload? (yes/no) [no] " rd_ans
83
+ read -r - p " Directory $dir already exists, do you wish to delete it and redownload? (yes/no) [no] " rd_ans
84
84
if [ -z " $rd_ans " ]; then
85
85
rd_ans=' no'
86
86
fi
@@ -98,7 +98,7 @@ if [ "$clone_repo" = "True" ]; then
98
98
echo " Removing old directory"
99
99
if [ " $dir " != " ." ] || [ " $dir " != " $PWD " ]; then
100
100
echo " Cleaning up from inside the destination directory"
101
- rm -rf $dir
101
+ rm -rf " $dir "
102
102
fi
103
103
clone_command
104
104
else
110
110
if [ -z " $dir " ]; then
111
111
dir=" ."
112
112
fi
113
- cd $dir
113
+ cd " $dir "
114
114
echo " Switched to $PWD "
115
115
116
116
if [ " $rd_dep " = " yes" ]; then
124
124
125
125
if yarn build; then
126
126
echo " Popcorn Time built successfully!"
127
- if [[ ` uname -s` != * " NT" * ]]; then # if not windows
127
+ if [[ " $( uname -s) " != * " NT" * ]]; then # if not windows
128
128
./Create-Desktop-Entry
129
129
fi
130
130
echo " Run 'yarn start' to launch the app or run Popcorn-Time from the ./build folder..."
0 commit comments