Solved

Github help

Posted on 2013-11-05
2
470 Views
Last Modified: 2013-11-05
I need a script that will clone the filename.js project from GitHub into a directory called 'wwt-rocks'. If the directory already exists, I need to delete it first.  

Use any language you want: Bash, Zsh, Ruby, Groovy, Python, Node.js, Puppet…doesn't matter
0
Comment
Question by:taviaf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
gelonida earned 500 total points
ID: 39623745
Is this what you want?
I don't know whether you want to have multiple wwt-rocks directory
in different places of your file system or whether you
want to have only one. In this case I'd use an ABSOLUTE path name for
$local_dir



#!/bin/sh

# configuration:
local_dir="wwt-rocks "
git_url="https://github.com/xxxxx/filename.git"

test -d "$local_dir" && rm -rf "$local_dir"
git clone "$git_url"

Open in new window

0
 

Author Comment

by:taviaf
ID: 39623823
Your the best...
0

Featured Post

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question