Skip to content

Commit

Permalink
Merge branch 'release/1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
basvandriel committed Jul 17, 2017
2 parents 716e8fe + 7c2971d commit a530402
Show file tree
Hide file tree
Showing 3 changed files with 174 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG-1.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changes in application-development-directory setup 1.1
All notable changes of the application-development-directory 1.1 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## 1.1 - July 17, 2017
- Added Linux compatibility for all previous features released in 1.0.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ git clone https://github.com/basvandriel/application-development-directory-setup
cd bin/
```

From there open the `create-folders.cmd` file with administrator rights and follow the instructions.
On a Windows machine run the `create-folders.cmd` script with administrator rights and
follow the instructions.

On a Linux machine run the command `sh create-folders.sh` inside the `bin` folder.

## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

## Authors
This project was initially created by [Bas van Driel](https://github.com/basvandriel "GitHub page") ([@bvandriel](https://twitter.com/bvandriel "Twitter page")), where [these people](https://github.com/basvandriel/WWW/graphs/contributors) contributed to it.
- [Bas van Driel](https://github.com/basvandriel "GitHub page") ([@bvandriel](https://twitter.com/bvandriel "Twitter page"))
- [Marco van Poortvliet](https://www.github.com/marc0tjevp "GitHub page")

## Links
* [Source code](https://github.com/basvandriel/application-development-directory-setup)
Expand Down
163 changes: 163 additions & 0 deletions bin/create-folders.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
#!/bin/bash

# Array with all main folders
mainFolders=(Desktop_application_development Mobile_application_development Other_application_development Web_application_development)

# Arrays with all subfolders
desktopFolders=(Archive Exercise Other_stuff Projects Scrapboard)
mobileFolders=(Archive Android_projects Exercise IOS_projects Other_stuff Scrapboard)
otherFolders=(Archive Exercise Other_stuf Projects Scrapboard)
webFolders=(Archive Back_end_projects Exercise Font_end_projects Other_stuff Scrapboard)

# Arrays with all archive folders
desktopArchiveFolders=(Exercise Other_stuff Projects Scrapboard)
mobileArchiveFolders=(Android_projects Exercise IOS_projects Other_stuff Scrapboard)
otherArchiveFolders=(Exercise Other_stuf Projects Scrapboard)
webArchiveFolders=(Back_end_projects Exercise Font_end_projects Other_stuff Scrapboard)

# Markup used in the script
RED='\033[0;31m'
GREEN='\033[0;32m'
ORANGE='\033[1;43m'
TEST='\033[1;10m'
NC='\033[0m'
bold=$(tput bold)
normal=$(tput sgr0)

# Default install folder
installFolder="DevelopmentFolder"

# Clear the screen
clear

# Welcome the user
echo
echo -e "${TEST}Welcome to the application development directory setup${NC}"
echo "- Created by Marco van Poortvliet"
echo
echo "This script will create a Development Folder which contains subfolders for Desktop, Mobile, Web and Other development. These folders also contain subfolders."
echo
echo -e "${RED}Folders that already exist will be skipped.${NC}"
echo

# Ask user to continue or not
read -p "Do you wish to continue (${bold}Y${normal}/n)?" CONT
if [ "$CONT" = "Y" ]; then

echo
echo -e "The default install folder is ${bold}${ORANGE}~/$installFolder${NC}${normal}"
echo

# Ask user to change the install folder
read -p "Do you wish to change it (${bold}Y${normal}/n)?" CONT
if [ "$CONT" = "Y" ]; then
echo
echo -n "Enter the folder name and press [ENTER]: "
read installFolder
echo
echo -e "The new installation folder is ${bold}${ORANGE}~/$installFolder${NC}${normal}"
fi

##########################
# Create Project Folders #
##########################

echo
echo "Creating Project folders..."
echo

for mainFolder in ${mainFolders[@]}
do
echo -e "${GREEN}Creating${NC} $mainFolder"
mkdir -p ~/$installFolder/$mainFolder
done

##########################
# Create Sub Folders #
##########################

echo
echo "Creating subfolders..."
echo

for desktopFolder in ${desktopFolders[@]}
do
echo -e "${GREEN}Creating${NC} Desktop_application_development/$desktopFolder"
mkdir -p ~/$installFolder/Desktop_application_development/$desktopFolder
done

echo

for mobileFolder in ${mobileFolders[@]}
do
echo -e "${GREEN}Creating${NC} Mobile_application_development/$mobileFolder"
mkdir -p ~/$installFolder/Mobile_application_development/$mobileFolder
done

echo

for otherFolder in ${otherFolders[@]}
do
echo -e "${GREEN}Creating${NC} Other_application_development/$otherFolder"
mkdir -p ~/$installFolder/Other_application_development/$otherFolder
done

echo

for webFolder in ${webFolders[@]}
do
echo -e "${GREEN}Creating${NC} Web_application_development/$webFolder"
mkdir -p ~/$installFolder/Web_application_development/$webFolder
done

##########################
# Create Archive Folders #
##########################

echo
echo "Creating Archive and Scrapboard folders..."
echo

for desktopArchiveFolder in ${desktopArchiveFolders[@]}
do
echo -e "${GREEN}Creating${NC} Desktop_application_development/Archive/$desktopArchiveFolder"
mkdir -p ~/$installFolder/Desktop_application_development/Archive/$desktopArchiveFolder
echo -e "${GREEN}Creating${NC} Desktop_application_development/Scrapboard/$desktopArchiveFolder"
mkdir -p ~/$installFolder/Desktop_application_development/Scrapboard/$desktopArchiveFolder
done

echo

for mobileArchiveFolder in ${mobileArchiveFolders[@]}
do
echo -e "${GREEN}Creating${NC} Mobile_application_development/Archive/$mobileArchiveFolder"
mkdir -p ~/$installFolder/Mobile_application_development/Archive/$mobileArchiveFolder
echo -e "${GREEN}Creating${NC} Mobile_application_development/Scrapboard/$mobileArchiveFolder"
mkdir -p ~/$installFolder/Mobile_application_development/Scrapboard/$mobileArchiveFolder
done

echo

for otherArchiveFolder in ${otherArchiveFolders[@]}
do
echo -e "${GREEN}Creating${NC} Other_application_development/Archive/$otherArchiveFolder"
mkdir -p ~/$installFolder/Other_application_development/Archive/$otherArchiveFolder
echo -e "${GREEN}Creating${NC} Other_application_development/Scrapboard/$otherArchiveFolder"
mkdir -p ~/$installFolder/Other_application_development/Scrapboard/$otherArchiveFolder
done

echo

for webArchiveFolder in ${webArchiveFolders[@]}
do
echo -e "${GREEN}Creating${NC} Web_application_development/Archive/$webArchiveFolder"
mkdir -p ~/$installFolder/Web_application_development/Archive/$webArchiveFolder
echo -e "${GREEN}Creating${NC} Web_application_development/Scrapboard/$webArchiveFolder"
mkdir -p ~/$installFolder/Web_application_development/Scrapboard/$webArchiveFolder
done

echo

else
exit 0
fi

0 comments on commit a530402

Please sign in to comment.