Skip to content

Commit

Permalink
feat: update command for macos and linux
Browse files Browse the repository at this point in the history
  • Loading branch information
yummy-licorice committed Aug 13, 2022
1 parent 3bea82a commit e723cd1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
4 changes: 0 additions & 4 deletions dye.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ task lint, "Lint all *.nim files":
task b, "Build for release":
exec "nimble install -d:release && nim c -d:ssl -d:release src/dye && mkdir -p bin && mv -f src/dye bin/"


task bz, "Build using zig as a c compiler":
exec "nimble install -y -d && nim c -d:release -d:ssl --cc:clang --clang.exe:'scripts/zigcc' src/dye.nim && mkdir -p bin && mv -f src/dye bin/"

task bi, "Build and install to your path (/usr/bin/)":
exec "nimble install -d:release && nim c -d:release -d:ssl src/dye"

Expand Down
4 changes: 2 additions & 2 deletions lib/updates.nim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os, harpoon, uri, strutils, asyncdispatch, distros, strformat, osproc, zippy/ziparchives

proc u*(v: string): void =
let cv = getContent(parseUri "https://raw.githubusercontent.com/Infinitybeond1/dye/master/dye.nimble").splitLines()[0].split("=")[1].strip().replace("\"", "")
let cv = getContent(parseUri "https://raw.githubusercontent.com/Infinitybeond1/dye/main/dye.nimble").splitLines()[0].split("=")[1].strip().replace("\"", "")
if v.replace(".", "").strip().parseInt() < cv.replace(".", "").strip().parseInt():
stdout.write("Updates are availible, would you like to update (Y/n): ")
let a = readLine(stdin).toLower()
Expand Down Expand Up @@ -36,7 +36,7 @@ proc u*(v: string): void =
elif v.replace(".", "").strip().parseInt() == cv.replace(".", "").strip().parseInt():
echo "You're all up to date"
else:
echo fmt"Your version: {v}\nCurrent version: {cv}"
echo "Your version: $#\nCurrent version: $#" % @[v, cv]

proc tu*(v: string): void =
let cv = getContent(parseUri "https://raw.githubusercontent.com/Infinitybeond1/dye/master/version.txt")
Expand Down
6 changes: 0 additions & 6 deletions src/dye.nim
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,8 @@ if args.flip.seen:
except:
stdout.styledWriteLine(fgRed, "Error: ", fgWhite, getCurrentExceptionMsg())
continue
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
elif args.update.seen:
u(versionNum)
>>>>>>> 45263dd (feat: update command for macos and linux)
>>>>>>> 025954b (feat: update command for macos and linux)
elif args.luma.seen:
for img in files:
try:
Expand Down

0 comments on commit e723cd1

Please sign in to comment.