"USAGE:"
echo " npkg-install [PACKAGE]"
quit(QuitSuccess)
else:
if (not dirExists("/home/blaze/0_JustTesting/installed_packages/")):
createDir("/home/blaze/0_JustTesting/installed_packages/")
if (fileExists("/home/blaze/0_JustTesting/installed_packages/" & paramStr(1))):
echo "Package already installed (^ω^)"
echo "Do you wanna reinstall this package?? [Y/N]"
let command = stdin.readLine()
if (command == "Y" or command == "y"):
echo "Reinstalling package..."
else:
quit(QuitSuccess)
try:
extractAll(paramStr(1), "./tmp/")
#echo "Extracting package, please wait..."
except:
echo "Error! Can't extract package! :("
quit(QuitFailure)
try:
removeFile("./tmp/package.ini")
copyDir("./tmp/", "/home/blaze/0_JustTesting/")
removeDir("./tmp/")
copyFile("./" & paramStr(1), "/home/blaze/0_JustTesting/installed_packages/" & paramStr(1))
except:
echo "Error! Can't install package! :("
quit(QuitFailure)
echo "Package Installed! ( ̄▽ ̄)"
quit(QuitSuccess)
nekobin.com
ахха npkg - Neko Package Manager (no, not npm)
Обсуждают сегодня