+function process_lib {
+ pushd ~/locallib 1>/dev/null
+ if [ $(ls lib/p*/ |wc -w) -eq 1 ]
+ then
+ # seems to be arichtecturalsub dir
+ arch_dir=$(ls lib/p*/)
+ cd lib/p*/
+ mv $arch_dir/* .
+ rmdir $arch_dir
+ cd ../..
+ fi
+
+ # check, if there is a real archtecturel depandence
+ shared_lib=$(find . -name "*.so")
+ if [ -n "$shared_lib" ]
+ then
+ arch=$(arch)
+ fi
+ popd 1>/dev/null
+ mv ~/locallib/lib $name/usr/
+}
+