Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Github help

Posted on 2013-11-05
2
Medium Priority
?
523 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 17

Accepted Solution

by:
gelonida earned 2000 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 Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
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…
Screencast - Getting to Know the Pipeline

824 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