|
@@ -0,0 +1,57 @@
|
|
|
+#!/usr/bin/perl
|
|
|
+
|
|
|
+use strict;
|
|
|
+use warnings;
|
|
|
+use YAML qw(LoadFile DumpFile);
|
|
|
+
|
|
|
+my $configFile = "$ENV{HOME}/.sshfs-helper";
|
|
|
+
|
|
|
+my $configData;
|
|
|
+
|
|
|
+if ((not -e $configFile)) {
|
|
|
+ $configData = {};
|
|
|
+ DumpFile($configFile);
|
|
|
+} else {
|
|
|
+ $configData = LoadFile($configFile);
|
|
|
+}
|
|
|
+
|
|
|
+sub addConfig {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+sub changeConfig {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+sub mount {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+sub unmount {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+sub usage {
|
|
|
+ print "sshfs-helper [ add | edit name | mount name | unmount name | help ]\n";
|
|
|
+}
|
|
|
+
|
|
|
+sub help {
|
|
|
+ usage();
|
|
|
+ print <<EOF;
|
|
|
+
|
|
|
+EOF
|
|
|
+ exit 1;
|
|
|
+}
|
|
|
+
|
|
|
+my $command = shift @ARGV;
|
|
|
+my @arguments = @ARGV;
|
|
|
+
|
|
|
+if ($command eq "add") {
|
|
|
+} elsif ($command eq "edit") {
|
|
|
+} elsif ($command eq "mount") {
|
|
|
+} elsif ($command eq "unmount") {
|
|
|
+} elsif ($command eq "help") {
|
|
|
+} else {
|
|
|
+ usage();
|
|
|
+ exit 1;
|
|
|
+}
|