Solved

Github help

Posted on 2013-11-05
2
479 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 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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…
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 lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…

752 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