]> wagnertech.de Git - projects.git/blobdiff - debian/eclipse-cpp.postinst
eclipse-cpp added
[projects.git] / debian / eclipse-cpp.postinst
diff --git a/debian/eclipse-cpp.postinst b/debian/eclipse-cpp.postinst
new file mode 100755 (executable)
index 0000000..83b1889
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+
+for user in user nutzer kurs; do
+       if [ -d /home/$user ]; then
+               echo "Install eclipse for user $user"
+               pushd /home/$user >/dev/null
+
+                       if [ -d Schreibtisch ]; then
+                               pushd Schreibtisch >/dev/null
+                                       su $user -c "ln -sf /opt/eclipse-cpp/eclipse ."
+                               popd >/dev/null
+                       fi
+
+                       if [ -d Desktop ]; then
+                               pushd Desktop >/dev/null
+                                       su $user -c "ln -sf /opt/eclipse-cpp/eclipse ."
+                               popd >/dev/null
+                       fi
+               popd >/dev/null
+       fi
+done
+