mirror of https://github.com/fairyglade/ly.git
Try to create /etc/pam.d and /usr/bin everytime when installing
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
85e071a60a
commit
87503367e9
|
@ -232,11 +232,11 @@ fn install_ly(allocator: std.mem.Allocator, install_config: bool) !void {
|
||||||
|
|
||||||
{
|
{
|
||||||
const exe_path = try std.fs.path.join(allocator, &[_][]const u8{ dest_directory, prefix_directory, "/bin" });
|
const exe_path = try std.fs.path.join(allocator, &[_][]const u8{ dest_directory, prefix_directory, "/bin" });
|
||||||
if (!std.mem.eql(u8, dest_directory, "")) {
|
|
||||||
std.fs.cwd().makePath(exe_path) catch {
|
std.fs.cwd().makePath(exe_path) catch {
|
||||||
|
if (!std.mem.eql(u8, dest_directory, "")) {
|
||||||
std.debug.print("warn: {s} already exists as a directory.\n", .{exe_path});
|
std.debug.print("warn: {s} already exists as a directory.\n", .{exe_path});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
var executable_dir = std.fs.cwd().openDir(exe_path, .{}) catch unreachable;
|
var executable_dir = std.fs.cwd().openDir(exe_path, .{}) catch unreachable;
|
||||||
defer executable_dir.close();
|
defer executable_dir.close();
|
||||||
|
@ -295,11 +295,11 @@ fn install_ly(allocator: std.mem.Allocator, install_config: bool) !void {
|
||||||
|
|
||||||
{
|
{
|
||||||
const pam_path = try std.fs.path.join(allocator, &[_][]const u8{ dest_directory, config_directory, "/pam.d" });
|
const pam_path = try std.fs.path.join(allocator, &[_][]const u8{ dest_directory, config_directory, "/pam.d" });
|
||||||
if (!std.mem.eql(u8, dest_directory, "")) {
|
|
||||||
std.fs.cwd().makePath(pam_path) catch {
|
std.fs.cwd().makePath(pam_path) catch {
|
||||||
|
if (!std.mem.eql(u8, dest_directory, "")) {
|
||||||
std.debug.print("warn: {s} already exists as a directory.\n", .{pam_path});
|
std.debug.print("warn: {s} already exists as a directory.\n", .{pam_path});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
var pam_dir = std.fs.cwd().openDir(pam_path, .{}) catch unreachable;
|
var pam_dir = std.fs.cwd().openDir(pam_path, .{}) catch unreachable;
|
||||||
defer pam_dir.close();
|
defer pam_dir.close();
|
||||||
|
|
Loading…
Reference in New Issue