fix for latest ubuntu that mounts inserted disks at
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 24 Feb 2013 13:45:32 +0000 (15:45 +0200)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 24 Feb 2013 13:45:32 +0000 (15:45 +0200)
/media/<userName>/

pom.xml
src/main/java/eu/svjatoslav/meviz/grabmemcard/Main.java

diff --git a/pom.xml b/pom.xml
index 6723d61..6a00912 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
-<project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>eu.svjatoslav</groupId>
-    <artifactId>meviz</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    <packaging>jar</packaging>
-    <name>meviz</name>
-    <description>media wizard</description>
-
-    <organization>
-        <name>svjatoslav.eu</name>
-        <url>http://svjatoslav.eu</url>
-    </organization>
-
-    <dependencies>
-        <dependency>
-            <groupId>eu.svjatoslav</groupId>
-            <artifactId>svjatoslavcommons</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>1.2.16</version>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <archive>
-                        <manifest>
-                            <mainClass>eu.svjatoslav.meviz.Main</mainClass>
-                        </manifest>
-                    </archive>
-                    <descriptorRefs>
-                        <descriptorRef>jar-with-dependencies</descriptorRef>
-                    </descriptorRefs>
-                </configuration>
-
-                <executions>
-
-                    <execution>
-                        <id>package-jar-with-dependencies</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <appendAssemblyId>false</appendAssemblyId>
-                            <descriptorRefs>
-                                <descriptorRef>jar-with-dependencies</descriptorRef>
-                            </descriptorRefs>
-                            <archive>
-                                <manifest>
-                                    <mainClass>eu.svjatoslav.meviz.Main</mainClass>
-                                </manifest>
-                            </archive>
-                        </configuration>
-                    </execution>
-
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.3.2</version>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <version>2.2.1</version>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <version>2.9</version>
-                <executions>
-                    <execution>
-                        <id>attach-javadocs</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-        </plugins>
-
-        <extensions>
-            <extension>
-                <groupId>org.apache.maven.wagon</groupId>
-                <artifactId>wagon-ssh</artifactId>
-                <version>2.2</version>
-            </extension>
-        </extensions>
-
-    </build>
-
-    <distributionManagement>
-        <snapshotRepository>
-            <id>svjatoslav.eu</id>
-            <name>svjatoslav.eu</name>
-            <url>scp://svjatoslav.eu:7022/var/www/maven</url>
-        </snapshotRepository>
-    </distributionManagement>
-
-    <repositories>
-        <repository>
-            <id>svjatoslav.eu</id>
-            <name>Svjatoslav repository</name>
-            <url>http://www2.svjatoslav.eu/maven/</url>
-        </repository>
-    </repositories>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>eu.svjatoslav</groupId>
+       <artifactId>meviz</artifactId>
+       <version>1.0-SNAPSHOT</version>
+       <packaging>jar</packaging>
+       <name>meviz</name>
+       <description>media wizard</description>
+
+       <organization>
+               <name>svjatoslav.eu</name>
+               <url>http://svjatoslav.eu</url>
+       </organization>
+
+       <dependencies>
+               <dependency>
+                       <groupId>eu.svjatoslav</groupId>
+                       <artifactId>svjatoslavcommons</artifactId>
+                       <version>1.0-SNAPSHOT</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>log4j</groupId>
+                       <artifactId>log4j</artifactId>
+                       <version>1.2.16</version>
+               </dependency>
+
+       </dependencies>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-assembly-plugin</artifactId>
+                               <configuration>
+                                       <archive>
+                                               <manifest>
+                                                       <mainClass>eu.svjatoslav.meviz.Main</mainClass>
+                                               </manifest>
+                                       </archive>
+                                       <descriptorRefs>
+                                               <descriptorRef>jar-with-dependencies</descriptorRef>
+                                       </descriptorRefs>
+                               </configuration>
+
+                               <executions>
+
+                                       <execution>
+                                               <id>package-jar-with-dependencies</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>single</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <appendAssemblyId>false</appendAssemblyId>
+                                                       <descriptorRefs>
+                                                               <descriptorRef>jar-with-dependencies</descriptorRef>
+                                                       </descriptorRefs>
+                                                       <archive>
+                                                               <manifest>
+                                                                       <mainClass>eu.svjatoslav.meviz.Main</mainClass>
+                                                               </manifest>
+                                                       </archive>
+                                               </configuration>
+                                       </execution>
+
+                               </executions>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                               <version>2.3.2</version>
+                               <configuration>
+                                       <source>1.6</source>
+                                       <target>1.6</target>
+                               </configuration>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-source-plugin</artifactId>
+                               <version>2.2.1</version>
+                               <executions>
+                                       <execution>
+                                               <id>attach-sources</id>
+                                               <goals>
+                                                       <goal>jar</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-javadoc-plugin</artifactId>
+                               <version>2.9</version>
+                               <executions>
+                                       <execution>
+                                               <id>attach-javadocs</id>
+                                               <goals>
+                                                       <goal>jar</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+
+               </plugins>
+
+               <extensions>
+                       <extension>
+                               <groupId>org.apache.maven.wagon</groupId>
+                               <artifactId>wagon-ssh</artifactId>
+                               <version>2.2</version>
+                       </extension>
+               </extensions>
+
+       </build>
+
+       <distributionManagement>
+               <snapshotRepository>
+                       <id>svjatoslav.eu</id>
+                       <name>svjatoslav.eu</name>
+                       <url>scp://svjatoslav.eu:7022/var/www/maven</url>
+               </snapshotRepository>
+       </distributionManagement>
+
+       <repositories>
+               <repository>
+                       <id>svjatoslav.eu</id>
+                       <name>Svjatoslav repository</name>
+                       <url>http://www2.svjatoslav.eu/maven/</url>
+
+                       <releases>
+                               <enabled>true</enabled>
+                       </releases>
+                       <snapshots>
+                               <enabled>true</enabled>
+                       </snapshots>
+               </repository>
+       </repositories>
 
 </project>
index d7f866e..cb3406a 100755 (executable)
@@ -88,7 +88,9 @@ public class Main implements Module {
                final Converter converter = new Mts2Mp4();
                final EncodingPlan encodingPlan = new EncodingPlan();
 
-               final File file = new File("/media");
+               final String userName = System.getProperty("user.name");
+
+               final File file = new File("/media/" + userName + "/");
 
                for (final File insertedDisk : file.listFiles()) {
                        final File[] diskVideos = getDiskVideos(insertedDisk);