Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion task-1/setup.sh
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
# Write your code here
echo "Creating project…"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually it is a good practice to include #!/bin/bash or #!/usr/bin/env bash line at the beginning of a shell script file.

mkdir project;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In shell scripting, using semicolons ath the end of a line is not necessary, but it is possible to use them of course.

cd project
git init
mkdir resources src
touch settings.conf
cd resources
touch "family picture.jpg" icon.png logo.png
cd ../src
mkdir database profile
touch program.java
git add -A
git commit -m "initial commit"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of this point you're still in src directory. It's usually a good practice to change directory into the root before running git commands.

sleep 3
echo "Setup projet..."
echo "Welcome to my project" >README.md
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of this point you're still in src directory. So README.md file will be created in src, but it needs to be in the root (project) directory.

cd src
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you are already in src directory, this command will throw an error:

line 17: cd: src: No such file or directory

rmdir profile
cd ../resources
rm "family picture.jpg"
git add -A
git commit -m "second commit" -m "removed family picture Woopsie😁 and my personal profile"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job on a descriptive commit message. But a signle message needs to be created. You can remove the first one.

sleep 3
ls
echo "Setup javascript…"
cd ../src
git mv program.java program.js
echo 'console.log("JavaScript Works!");' >program.js
node program.js
git add -A
git commit -m "third commit" -m "java script works now/ renamed program and added 1 line of code"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job on a descriptive commit message. But a signle message needs to be created. You can remove the first one.

cd ~
ls
echo 'All done!'
2 changes: 1 addition & 1 deletion task-2/github-username.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<paste here your github username>
<noneeeed>