forked from kubuntu-team/kubuntu.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
31 lines (26 loc) · 798 Bytes
/
Copy pathsetup.sh
File metadata and controls
31 lines (26 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Checks and installs hugo and git if necessary
for cmd in hugo git
do
if ! command -v $cmd &> /dev/null
then
echo "$cmd is not installed. Installing via Snap..."
sudo snap install $cmd
fi
done
# Checks for Github directory in home directory and changes into it
if [ ! -d "$HOME/Github" ]; then
echo "Github directory not found. Creating it..."
mkdir "$HOME/Github"
fi
cd "$HOME/Github"
# Clones the repository and moves into it
if [ ! -d "$HOME/Github/kubuntu.org" ]; then
git clone git@github.com:kubuntu-team/kubuntu.org.git
fi
cd kubuntu.org
# Creates a new branch
branchname=$USER"new-contributor"
git checkout -b $branchname
# Displays a welcome message
echo "Welcome to the kubuntu.org project! You are now on the branch $branchname."