work in progress
[src/app-framework-main.git] / src / wgtpkg-installer.c
index 62807aa..def311c 100644 (file)
 #include <unistd.h>
 #include <limits.h>
 #include <errno.h>
-#include <syslog.h>
 #include <getopt.h>
 
 #include "verbose.h"
 #include "wgtpkg.h"
 
-static const char appname[] = "wgtpkg-install";
+static const char appname[] = "wgtpkg-installer";
 static const char *root;
 static int force;
 
@@ -61,9 +60,8 @@ static struct option options[] = {
 int main(int ac, char **av)
 {
        int i;
-       char *wpath;
 
-       openlog(appname, LOG_PERROR, LOG_AUTH);
+       LOGAUTH(appname);
 
        xmlsec_init();
 
@@ -104,19 +102,9 @@ int main(int ac, char **av)
                return 1;
        }
 
-       /* canonic names for files */
+       /* install widgets */
        av += optind;
-       for (i = 0 ; av[i] != NULL ; i++) {
-               wpath = realpath(av[i], NULL);
-               if (wpath == NULL) {
-                       ERROR("error while getting realpath of %dth widget: %s", i+1, av[i]);
-                       return 1;
-               }
-               av[i] = wpath;
-       }
        root = *av++;
-
-       /* install widgets */
        for ( ; *av ; av++)
                install_widget(*av, root, force);