first commit
This commit is contained in:
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
*.*
|
||||
*
|
||||
!*/
|
||||
!Makefile
|
||||
!.gitignore
|
||||
!init.sh
|
13
Makefile
Normal file
13
Makefile
Normal file
@ -0,0 +1,13 @@
|
||||
-include nemu/Makefile.git
|
||||
|
||||
clean:
|
||||
-$(MAKE) -C nemu clean
|
||||
-$(MAKE) -C nexus-am clean
|
||||
-$(MAKE) -C nanos-lite clean
|
||||
-$(MAKE) -C navy-apps clean
|
||||
|
||||
submit: clean
|
||||
git gc
|
||||
cd .. && tar cj $(basename $(shell pwd)) > $(STU_ID).tar.bz2
|
||||
|
||||
.PHONY: clean submit
|
36
init.sh
Normal file
36
init.sh
Normal file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
function init() {
|
||||
if test -d $1; then
|
||||
echo "$1 is already initialized, exiting..."
|
||||
return
|
||||
fi
|
||||
|
||||
git clone -b ics2017 https://github.com/NJU-ProjectN/$1.git
|
||||
rm -rf $1/.git
|
||||
|
||||
if test $2; then
|
||||
sed -i -e "/^export $2=.*/d" ~/.bashrc
|
||||
echo "export $2=`realpath $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
|
||||
|
||||
git add -A
|
||||
git commit -am "ics2017 initialized"
|
||||
;;
|
||||
|
||||
[nN])
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Invalid input..."
|
||||
;;
|
||||
esac
|
Reference in New Issue
Block a user