-
Notifications
You must be signed in to change notification settings - Fork 6
/
create_project.bat
59 lines (59 loc) · 980 Bytes
/
create_project.bat
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
58
59
@echo off
rem # create_project.bat
rem #
rem # Create a MESCC project.
rem #
rem # Created: 06 Jan 2016
rem # Updated: 18 Dec 2018
rem #
rem # Check command line arguments
rem #
if "%1"=="" goto usage
if not "%2"=="" goto usage
rem #
rem # Check project name
rem #
if exist "%1" goto err_exist
rem #
rem # Make project folder
rem #
echo Making project folder...
mkdir "%1"
rem #
rem # Update contents
rem #
call update_project %1
rem #
rem # Making initial files
rem #
echo Making initial files...
copy mescc\template.c %1\%1.c
rem #
rem # Project makefile
rem #
echo cpm cc %1 > %1\make.bat
echo cpm ccopt %1 >> %1\make.bat
echo cpm zsm %1.@@Z >> %1\make.bat
echo cpm hextocom %1 >> %1\make.bat
echo erase %1.zsm >> %1\make.bat
echo erase %1.hex >> %1\make.bat
rem #
rem # Done
rem #
goto end
rem #
rem # Usage
rem #
:usage
echo Usage: create_project project_name
goto end
rem #
rem # Error
rem #
:err_exist
echo Error: Project already exists!
goto end
rem #
rem # End
rem #
:end