Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
install script corrected
  • Loading branch information
hagenlauer committed Apr 28, 2012
1 parent 5e98e04 commit 0a6d5d5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion derp.coffee
@@ -1,6 +1,6 @@
# Derp me, Derp.
#
# return the famous derp song
# returns the famous derp song
module.exports = (robot) ->
robot.respond /(derp me)|(derp song)|(dirk me)|(dirk is so smart)/i, (msg) ->
msg.send "http://www.youtube.com/watch?v=nQB4nAjZIdE"
14 changes: 11 additions & 3 deletions install
@@ -1,14 +1,17 @@
#!/usr/bin/perl

(my $out, $path, $hubotscriptpath, $jsonpath);
use Cwd;

(my $out, $path, $hubotscriptpath, $jsonpath, $dir);
$dir = cwd;

if(@ARGV > 0){
$path = $ARGV[0];
print $path . "\n";
}else{
my $test = system("cd ../hubot");
if($test == 0){
#$path = "/Users/hagenlauer/Documents/Developement/hubot";
$path = "../hubot";
}else{
die("DAFUQ? no parameters, where am I supposed to write that shit at?");
Expand All @@ -25,8 +28,12 @@ print JSON "[";
my @arr = split (/\n/,$out);
my $cnt = 0;
foreach(@arr){

$_ =~ s/\.\///;

#print "rm $hubotscriptpath/$_\n";
#print "ln -s $_ $hubotscriptpath/$_\n";
system("rm $hubotscriptpath/$_"); #delete the old links, that might me deprecated

if($cnt == 0){
print JSON "\"".$_."\",";
$cnt++;
Expand All @@ -42,7 +49,8 @@ foreach(@arr){
}
print JSON "]";

system("ln -s *.coffee $hubotscriptpath");
#print ("ln -s $dir/*.coffee $hubotscriptpath \n");
system("ln -s $dir/*.coffee $hubotscriptpath");



Expand Down

0 comments on commit 0a6d5d5

Please sign in to comment.