Simple bash script that's create new gitlab or github project and clone created project to same named folder on local machine.
-
Clone to directory of choice:
git clone https://github.com/LOCOSP/git-projetcs-automate.git -
Give permissions to
automatelabandautomatehubfilechmod +x automatelab chmod +x automatehub -
Copy
.automatefile into home directory. -
Edit
.automatefile.
Done.
*Mac users if wnat to use VS Code as a editor, may have one more step to do
- Install Code in PATH
- Launch VS Code.
- Open the Command Palette (⇧⌘P) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command.
To run script navigate to script directory and type if the project should be created on GitLab
./automatelab [ new project name ]
and if should be created on GitHub
./automatehub [ new project name ]
To use the script globally create link in /usr/bin (as root):
ln -s /full/path/to/automatelab /usr/bin
ln -s /full/path/to/automatehub /usr/bin
after that You can call automatelab [ new project name ] for GitLab project and automatehub [ new project name ] for GitHub project form any directory You are.