Skip to content
Snippets Groups Projects
Commit 5cd50dc8 authored by Zihao Yu's avatar Zihao Yu
Browse files

ready for ics2018

parents
No related branches found
No related tags found
No related merge requests found
*.*
*
!*/
!Makefile
!README.md
!.gitignore
!init.sh
Makefile 0 → 100644
include nemu/Makefile.git
default:
@echo "Please run 'make' under any subprojects to compile."
clean:
-$(MAKE) -C nemu clean
-$(MAKE) -C nexus-am clean
-$(MAKE) -C nanos-lite clean
-$(MAKE) -C navy-apps clean
submit: clean
git gc
STUID=$(STUID) STUNAME=$(STUNAME) bash -c "$$(curl -s http://moon.nju.edu.cn/people/yyjiang/teach/submit.sh)"
.PHONY: default clean submit
# ICS2018 Programming Assignment
This project is the programming assignment of the class ICS(Introduction to Computer System) in Department of Computer Science and Technology, Nanjing University.
For the guide of this programming assignment,
refer to http://nju-ics.gitbooks.io/ics2018-programming-assignment/content/
To initialize, run
```bash
bash init.sh
```
The following subprojects/components are included. Some of them are not fully implemented.
* [NEMU](https://github.com/NJU-ProjectN/nemu)
* [Nexus-am](https://github.com/NJU-ProjectN/nexus-am)
* [Nanos-lite](https://github.com/NJU-ProjectN/nanos-lite)
* [Navy-apps](https://github.com/NJU-ProjectN/navy-apps)
init.sh 0 → 100644
#!/bin/bash
version=ics2018
log=""
function init() {
if [ -d $1 ]; then
echo "$1 is already initialized, exiting..."
return
fi
while [ ! -d $1 ]; do
git clone -b $version https://github.com/NJU-ProjectN/$1.git
done
log="$log$1 `cd $1 && git log --oneline --no-abbrev-commit -n1`"$'\n'
rm -rf $1/.git
if [ $2 ] ; then
sed -i -e "/^export $2=.*/d" ~/.bashrc
echo "export $2=`readlink -e $1`" >> ~/.bashrc
fi
}
read -r -p "Are you sure to initialize everything? [y/n] " input
case $input in
[yY])
init nemu NEMU_HOME
init nexus-am AM_HOME
init nanos-lite
init navy-apps NAVY_HOME
source ~/.bashrc
git add -A
git commit -am "$version initialized"$'\n\n'"$log"
echo "Initialization finishes!"
echo "By default this script will add enviornment variables into ~/.bashrc."
echo "If you use shell other than bash, please add these enviornment variables manually."
;;
[nN])
;;
*)
echo "Invalid input..."
;;
esac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment