Solved

Github help

Posted on 2013-11-05
2
431 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
2 Comments
 
LVL 16

Accepted Solution

by:
gelonida earned 500 total points
Comment Utility
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
Comment Utility
Your the best...
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
"Migrate" an SMTP relay receive connector to a new server using info from an old server.
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 while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now