summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/utils.c b/utils.c
index 5ca2174..1b0312d 100644
--- a/utils.c
+++ b/utils.c
@@ -1,4 +1,5 @@
#include "utils.h"
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -16,38 +17,48 @@ int detectOsType()
switch (i)
{
case apt:
- if ( checkIfFileExists("/usr/bin/apt") == 0 )
+ if ( checkIfFileExists("/usr/bin/apt" ) == 0 )
{
exists = i;
}
break;
case dnf:
- if ( checkIfFileExists("/usr/bin/dnf") == 0 )
+ if ( checkIfFileExists("/usr/bin/dnf" ) == 0 )
{
exists = i;
}
break;
case emerge:
- if ( checkIfFileExists("/usr/bin/emerge") == 0 )
+ if ( checkIfFileExists("/usr/bin/emerge" ) == 0 )
{
exists = i;
}
break;
case pacman:
- if ( checkIfFileExists("/usr/bin/pacman") == 0 )
+ if ( checkIfFileExists("/usr/bin/pacman" ) == 0 )
{
exists = i;
}
break;
case xbps:
- if ( checkIfFileExists("/usr/bin/xbps-install") == 0 )
+ if ( checkIfFileExists("/usr/bin/xbps-install" ) == 0 )
{
exists = i;
}
+ break;
+
+ case zypper:
+ if ( checkIfFileExists("/usr/bin/zypper" ) == 0 )
+ {
+ exists = i;
+ }
+
+ default:
+ puts("Unrecognized Package Manager" );
}
}
return exists;