"/home/neko/"
const workingDirectory = "/home/neko/"
proc unpackPkg(file: string) =
if dirExists(workingDirectory & extractFilename(file) & "_unpacked"):
removeDir(workingDirectory & extractFilename(file) & "_unpacked")
extractAll(file, workingDirectory & extractFilename(file) & "_unpacked")
echo "OK"
for f in walkFiles(workingDirectory & extractFilename(file) & "_unpacked"):
if fileExists(f):
moveFile(f, installDirectory & extractFilename(f))
elif dirExists(f):
moveDir(f, installDirectory)
removeDir(workingDirectory & file & "_unpacked")
removeFile(file)
unpackPkg("/home/neko/test.tar.gz", "/home/neko")
Почему код после echo "OK" не работает?
а как вы цвета сделали?
import terminal styledEcho https://nim-lang.org/docs/terminal.html
Обсуждают сегодня