Skip to content

Commit

Permalink
Merge pull request #136 from yuki-was-taken/aur
Browse files Browse the repository at this point in the history
Setup task does not wipe existing config files.
  • Loading branch information
iinsertNameHere authored Aug 19, 2024
2 parents d0e5d55 + b3e1a3c commit faa356a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions config.nims
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,22 @@ proc configure() =
configpath = XDG_CONFIG_HOME & "/catnap/"

echo "Creating " & configpath
mkdir(configpath)
if dirExists(configpath):
echo "Configuration directory already exists, skipping..."
else:
mkdir(configpath)

echo "Creating " & configpath & "config.toml"
cpFile(thisDir() & "/config/config.toml", configpath & "config.toml")
if fileExists(configpath & "config.toml"):
echo "Configuration file already exists, skipping..."
else:
cpFile(thisDir() & "/config/config.toml", configpath & "config.toml")

echo "Creating " & configpath & "distros.toml"
cpFile(thisDir() & "/config/distros.toml", configpath & "distros.toml")
if fileExists(configpath & "distros.toml"):
echo "Distro art file already exists, skipping..."
else:
cpFile(thisDir() & "/config/distros.toml", configpath & "distros.toml")

task release, "Builds the project in release mode":
echo "\e[36;1mBuilding\e[0;0m in release mode"
Expand Down

0 comments on commit faa356a

Please sign in to comment.