fix: fix scripts

This commit is contained in:
Kirill Samoylenkov 2025-09-30 09:21:46 +05:00
parent 6dcf2f6828
commit 00ea2b0c36
2 changed files with 4 additions and 3 deletions

View file

@ -136,6 +136,7 @@ in
unadd = "reset";
d = "diff";
ds = "diff --staged";
ch = "checkout";
};
extraConfig = {
init = {

View file

@ -7,7 +7,7 @@ pkgs: {
export my_wd=$PWD
cd ${configPath}
if [ ! -d ./${secretsPath} ]; then
if [ ! -d "${secretsPath}" ]; then
echo "Error: ${secretsPath} directory not found in ${configPath}"
echo "System not updated!"
cd $my_wd
@ -15,7 +15,7 @@ pkgs: {
exit 1
fi
if [ -z "$(find ./${secretsPath} -maxdepth 1 -name '*.yaml' -print -quit)" ]; then
if [ -z "$(find "${secretsPath}" -maxdepth 1 -name '*.yaml' -print -quit)" ]; then
echo "Error: No .yaml files found in ${secretsPath} directory"
echo "System not updated!"
cd $my_wd
@ -24,7 +24,7 @@ pkgs: {
fi
mkdir ./secrets
cp ./${secretsPath}/*.yaml ./secrets/
cp ${secretsPath}/*.yaml ./secrets/
git add ./secrets/*.yaml
if sudo nixos-rebuild switch --flake . "$@"; then