Skip to content

Commit c46916a

Browse files
Merge pull request #56 from lglglglgy/main
πŸ’― oooohhhhhhhhhhhhhhhhhhhhhhhh , creazy!!!!!!!! my beautiful run.sh
2 parents 041b967 + 2b3b33d commit c46916a

File tree

2 files changed

+54
-10
lines changed

2 files changed

+54
-10
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ rm mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
5656
mkdir build
5757
./run.sh
5858
```
59+
```
60+
#Another way (macos linux )
61+
sudo apt install git gcc g++ cmake libjsoncpp-dev uuid-dev zlib1g-dev openssl libssl-dev
62+
git clone https://github.com/stepbystepcode/flypen.git --recursive
63+
cd flypen
64+
./run.sh
65+
```
5966
## API Documentation
6067
See [API.md](API.md) for details on APIs for authentication, user management, documents, etc.
6168

β€Žrun.shβ€Ž

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/bash
2-
echo "-- β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—--"
3-
echo "-- β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β•šβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•‘--"
4-
echo "-- β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘--"
5-
echo "-- β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β•šβ–ˆβ–ˆβ•”β•β–‘β–‘β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘--"
6-
echo "-- β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ–ˆβ•‘--"
7-
echo "-- β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•β•β•β•β•β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β•--"
2+
83
#is macos
4+
echo "---- C++ Course Design ----"
95

6+
CORES=$(nproc)
7+
#ζœ€ε€šδ½Ώη”¨
8+
echo "-- Using $CORES cores."
9+
CORES=$((CORES-1))
1010
spin() {
1111
local -a spinner=( "β ‹" "β ™" "β Ή" "β Έ" "β Ό" "β ΄" "β ¦" "β §" "β ‡" "⠏" )
1212
local str=$1
@@ -18,7 +18,35 @@ spin() {
1818
done
1919
done
2020
}
21-
21+
#ζ£€ζ΅‹ζ˜―ε¦ε―δ»₯ζ‰§θ‘Œdg_ctl命什
22+
if [ ! -x "$(command -v dg_ctl)" ]; then
23+
echo "-- drogon does not exist, downloading..."
24+
git submodule update --init
25+
sleep 2
26+
cd drogon
27+
git submodule update --init
28+
sleep 2
29+
mkdir build
30+
cd build
31+
cmake ..
32+
echo "-- make -j$CORES"
33+
make -j$CORES
34+
sudo make install
35+
cd ../..
36+
fi
37+
#ζ£€ζ΅‹/usr/local/include/jwt-cpp/jwt.h是否存在
38+
if [ ! -f "/usr/local/include/jwt-cpp/jwt.h" ]; then
39+
echo "-- jwt-cpp does not exist, downloading..."
40+
git submodule update --init
41+
cd jwt-cpp
42+
mkdir build
43+
cd build
44+
cmake ..
45+
echo "-- make -j$CORES"
46+
make -j$CORES
47+
sudo make install
48+
cd ../..
49+
fi
2250

2351
if [ "$(uname)" == "Darwin" ]; then
2452
echo "-- Macos detected"
@@ -43,6 +71,7 @@ else
4371
#ζ£€ζ΅‹ζ˜―ε¦ε­˜εœ¨mysql-connectorζ–‡δ»Άε€Ή
4472
if [ ! -d "mysql-connector" ]; then
4573
echo "-- mysql-connector folder does not exist, downloading..."
74+
rm -rf mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
4675
wget https://cdn.mysql.com//Downloads/Connector-C++/mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
4776
#δΈ‹θ½½ζ˜―ε¦ζˆεŠŸ
4877
if [ $? -ne 0 ]; then
@@ -64,14 +93,22 @@ fi
6493
echo "-- build folder already exists "
6594
fi
6695
# θŽ·ε–ζœΊε™¨ηš„ζ ΈεΏƒζ•°
67-
CORES=$(nproc)
68-
echo "Using $CORES cores."
69-
CORES=$((CORES-1))
7096
cd build
7197
cmake ..
7298
make clean
7399
echo "-- make -j$CORES"
74100
make -j$CORES
101+
echo
102+
echo "======================================================="
103+
echo "-- β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—--"
104+
echo "-- β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β•šβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•‘--"
105+
echo "-- β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘--"
106+
echo "-- β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β•šβ–ˆβ–ˆβ•”β•β–‘β–‘β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘--"
107+
echo "-- β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ–ˆβ•‘--"
108+
echo "-- β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•β•β•β•β•β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β•--"
109+
echo "======================================================="
110+
echo
111+
sleep 1
75112
echo "-- Working in the background..."
76113
spin "Running ..." &
77114
SPIN_PID=$!

0 commit comments

Comments
Β (0)