Mercurial > hgbook
annotate en/examples/ch01/new @ 838:d1f676a6a4b3 default tip
update mq chapter.
propagate ef53d025f410.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 03 Dec 2009 01:26:08 +0900 |
parents | a17d6390a480 |
children |
rev | line source |
---|---|
826
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
1 #!/bin/bash |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
2 |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
3 cat > hello.c <<EOF |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
4 int main() |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
5 { |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
6 printf("hello world!\n"); |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
7 } |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
8 EOF |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
9 |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
10 cat > goodbye.c <<EOF |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
11 int main() |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
12 { |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
13 printf("goodbye world!\n"); |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
14 } |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
15 EOF |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
16 |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
17 #$ name: init |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
18 |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
19 hg init myproject |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
20 |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
21 #$ name: ls |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
22 |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
23 ls -l |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
24 |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
25 #$ name: ls2 |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
26 |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
27 ls -al myproject |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
28 |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
29 #$ name: add |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
30 |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
31 cd myproject |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
32 cp ../hello.c . |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
33 cp ../goodbye.c . |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
34 hg add |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
35 hg status |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
36 |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
37 #$ name: commit |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
38 |
a17d6390a480
More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
39 hg commit -m 'Initial commit' |