Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Github help

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

721 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