TARGET_DIR_ETC

This commit is contained in:
Linus Dierheimer
2022-10-09 10:39:57 +02:00
parent 2f6613cb50
commit 1dd942a7b1
9 changed files with 28 additions and 26 deletions
+3 -3
View File
@@ -43,12 +43,12 @@ void ffPrintLocale(FFinstance* instance)
//Ubuntu (and deriviates) use a non standard locale file.
//Parse it first, because on distributions where it exists, it takes precedence.
//Otherwise use the standard /etc/locale.conf file.
ffParsePropFile(FASTFETCH_TARGET_DIR_ROOT"/etc/default/locale", "LANG =", &locale);
//Otherwise use the standard etc/locale.conf file.
ffParsePropFile(FASTFETCH_TARGET_DIR_ETC"/default/locale", "LANG =", &locale);
if(locale.length == 0)
{
ffParsePropFile(FASTFETCH_TARGET_DIR_ROOT"/etc/locale.conf", "LANG =", &locale);
ffParsePropFile(FASTFETCH_TARGET_DIR_ETC"/locale.conf", "LANG =", &locale);
}
if(locale.length == 0)
+2 -2
View File
@@ -379,7 +379,7 @@ static void getPackageCounts(const FFinstance* instance, FFstrbuf* baseDir, Pack
ffStrbufSubstrBefore(baseDir, baseDirLength);
//pacman branch
ffStrbufAppendS(baseDir, "/etc/pacman-mirrors.conf");
ffStrbufAppendS(baseDir, FASTFETCH_TARGET_DIR_ETC"/pacman-mirrors.conf");
if(ffParsePropFile(baseDir->chars, "Branch =", &packageCounts->pacmanBranch) && packageCounts->pacmanBranch.length == 0)
ffStrbufAppendS(&packageCounts->pacmanBranch, "stable");
ffStrbufSubstrBefore(baseDir, baseDirLength);
@@ -399,7 +399,7 @@ static void getPackageCounts(const FFinstance* instance, FFstrbuf* baseDir, Pack
ffStrbufAppendS(baseDir, "/var/db/pkg/local.sqlite");
packageCounts->pkg += (uint32_t) ffSettingsGetSQLite3Int(instance, baseDir->chars, "SELECT count(id) FROM packages");
ffStrbufSubstrBefore(baseDir, baseDirLength);
#endif // __FreeBSD__
}