Skip to content

Commit

Permalink
Merge pull request #96 from MoaRoom/feat/#91
Browse files Browse the repository at this point in the history
Add terminal design
  • Loading branch information
NayeonKeum authored Sep 26, 2023
2 parents b97506a + 51305e8 commit b5cef72
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions resources/images/student-ubuntu/moaroom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,42 @@ usage() {
}

show_guide() {
echo "MoaRoom Guide: How to use MoaRoom!"
echo "1. Go to a specific assignment directory by using the cli command"
echo " You can use moaroom -h | --help to see how to use it"
echo "========================================================================"
echo " MoaRoom Guide: How to use MoaRoom!"
echo "========================================================================"
echo "1. Go to a specific assignment directory by using the cli command"
echo " You can use moaroom -h | --help to see how to use it"
echo "========================================================================"

}
list_assignments(){
lines=$((`ls -l assignment/ | wc -l`-1))
echo "========================================================================"
echo " These are the assignments in this container(lecture)"
echo "========================================================================"
lines=$((`ls -l ${DIR_PATH_STUDENT} | wc -l`-1))
for ((l=1 ; l <= $((lines)) ; l++));
do
directory=`ls -l assignment/ | awk 'NR=='"$((l+1))"' {print $9}'`
directory=`ls -l ${DIR_PATH_STUDENT} | awk 'NR=='"$((l+1))"' {print $9}'`
echo "$l. $directory"
done
echo ""
echo "========================================================================"
echo "Remember the number and get the cmd line with -m | --to-assignment option"
}
tree_assignments(){
echo "========================================================================"
echo " These are the assignments in this container(lecture)"
echo "========================================================================"
echo ""
tree "${DIR_PATH_STUDENT}"
echo "========================================================================"
}
to_assignment(){
directory=`ls -l assignment/ | awk 'NR=='"$((TARGET_ASSIGNMENT+1))"' {print $9}'`
echo "Run this on terminal"
echo "cd \"${DIR_PATH_STUDENT}/${directory}\""

directory=`ls -l ${DIR_PATH_STUDENT} | awk 'NR=='"$((TARGET_ASSIGNMENT+1))"' {print $9}'`
echo "========================================================================"
echo " Run this on terminal"
echo "========================================================================"
echo "> cd \"${DIR_PATH_STUDENT}/${directory}\""
echo "========================================================================"
}

while [ $# -gt 0 ]; do
Expand Down

0 comments on commit b5cef72

Please sign in to comment.