-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathccppp
More file actions
executable file
·28 lines (22 loc) · 752 Bytes
/
Copy pathccppp
File metadata and controls
executable file
·28 lines (22 loc) · 752 Bytes
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
#!/bin/sh
if [ $# -eq 0 ]
then
echo "Missing options. You must add a project name."
echo "ccp PROJECT_NAME"
exit 1
fi
echo "Building directories."
/bin/mkdir ./$1 && cd $1
mkdir ./build
/bin/mkdir ./src
echo "Downloading CMakeLists…"
/usr/bin/wget -q https://raw.githubusercontent.com/mmequignon/template-cpp/master/CMakeLists.txt
/bin/sed -i -- "s/MY_PROJECT/$1/" CMakeLists.txt
cd ./src
echo "Downloading main.cpp…"
/usr/bin/wget -q https://raw.githubusercontent.com/mmequignon/template-cpp/master/main.cpp
echo "Downloading main_test.cpp…"
/usr/bin/wget -q https://raw.githubusercontent.com/mmequignon/template-cpp/master/main_test.cpp
cd ..
echo "Done !"
exit 0