Commits

Shlomi Fish committed 8239b0e

Correct a typo in the dirname.

Comments (0)

Files changed (4)

shlomif-settings/Bash/hisotry-backup/backup-bash-history.pl

-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use File::Copy;
-use String::ShellQuote;
-
-use POSIX (qw(strftime));
-
-my $backup_base = "$ENV{HOME}/Backup/bash-history";
-my $trunk = "$backup_base/trunk";
-copy("$ENV{HOME}/.bash_history", "$trunk/bash-history/bash_history");
-my $date=strftime("+%Y-%m-%d-%H:%M:%S", localtime());
-
-my $file = shell_quote("$trunk/bash-history/bash_history");
-my $num_lines=`wc -l $file`;
-($num_lines) = ($num_lines =~ m{(\d+)});
-
-if (system("svn", "commit", "-q", "-m", "Commiting the bash_history as of $date\nContaining $num_lines lines.", $trunk))
-{
-    die "svn command failed";
-}

shlomif-settings/Bash/hisotry-backup/setup-backup-bash-history.bash

-#!/bin/bash
-
-base="$HOME/Backup/bash-history/"
-mkdir -p "$base"
-
-repo_dir="$base/svn-repos"
-svnadmin create "$repo_dir"
-url="file://$repo_dir"
-
-
-svn mkdir -m "Creating bash-history mini-repos" "$url/bash-history"
-svn mkdir -m "Creating the bash-history trunk" "$url/bash-history/trunk"
-
-(
-    cd $base
-    svn co "$url/bash-history/trunk"
-    cd trunk
-    svn mkdir "bash-history"
-    svn ci -m "Committing dir structure"
-)
-
-perl ~/bin/backup-bash-history.pl
-
-(
-    cd $base
-    cd trunk/bash-history
-    ls | grep -v '*~' | xargs svn add
-    svn ci -m "Initial commit with $(wc -l bash_history) lines"
-)

shlomif-settings/Bash/history-backup/backup-bash-history.pl

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use File::Copy;
+use String::ShellQuote;
+
+use POSIX (qw(strftime));
+
+my $backup_base = "$ENV{HOME}/Backup/bash-history";
+my $trunk = "$backup_base/trunk";
+copy("$ENV{HOME}/.bash_history", "$trunk/bash-history/bash_history");
+my $date=strftime("+%Y-%m-%d-%H:%M:%S", localtime());
+
+my $file = shell_quote("$trunk/bash-history/bash_history");
+my $num_lines=`wc -l $file`;
+($num_lines) = ($num_lines =~ m{(\d+)});
+
+if (system("svn", "commit", "-q", "-m", "Commiting the bash_history as of $date\nContaining $num_lines lines.", $trunk))
+{
+    die "svn command failed";
+}

shlomif-settings/Bash/history-backup/setup-backup-bash-history.bash

+#!/bin/bash
+
+base="$HOME/Backup/bash-history/"
+mkdir -p "$base"
+
+repo_dir="$base/svn-repos"
+svnadmin create "$repo_dir"
+url="file://$repo_dir"
+
+
+svn mkdir -m "Creating bash-history mini-repos" "$url/bash-history"
+svn mkdir -m "Creating the bash-history trunk" "$url/bash-history/trunk"
+
+(
+    cd $base
+    svn co "$url/bash-history/trunk"
+    cd trunk
+    svn mkdir "bash-history"
+    svn ci -m "Committing dir structure"
+)
+
+perl ~/bin/backup-bash-history.pl
+
+(
+    cd $base
+    cd trunk/bash-history
+    ls | grep -v '*~' | xargs svn add
+    svn ci -m "Initial commit with $(wc -l bash_history) lines"
+)