Scripts Added to download CustomAutoLoad samples++

merge-requests/76/head
Moe 2019-07-16 21:08:03 -07:00
parent af3ae1b1e0
commit 38a47e64e6
2 changed files with 7 additions and 5 deletions

View File

@ -17,11 +17,15 @@ var tempFolder = `${__dirname}/customAutoLoad`
var moduleList = selectedModule.split(',')
var moveModule = function(myModule){
exec(`mv ${tempFolder}/samples/${myModule} ${customAutoLoadFolder}${myModule}`,function(err){
console.log(`# Module "${myModule}" already exists or there is no source data.`)
if(err){
console.log(`# Module "${myModule}" already exists or there is no source data.`)
}else{
console.log(`# Getting Module "${myModule}"`)
}
})
}
exec(`git clone https://gitlab.com/Shinobi-Systems/customautoload-samples.git ${tempFolder}`,function(err){
console.log('# customAutoLoad directory seems to already exist.')
if(err)console.log('# customAutoLoad directory seems to already exist.')
moduleList.forEach(function(myModule,number){
moveModule(myModule)
if(moduleList.length === number + 1){

View File

@ -5,8 +5,6 @@ if(!selectedModule){
console.log('Example:')
console.log('# node removeCustomAutoLoadModule.js ExtraBlocks')
return
}else{
console.log(`## Removing ${selectedModule}`)
}
var exec = require('child_process').exec
var request = require('request')
@ -16,7 +14,7 @@ var tempFolder = `${__dirname}/customAutoLoad`
var deleteModule = function(myModule){
exec(`rm -rf ${customAutoLoadFolder}${myModule}`,function(){
console.log(`## Removing "${myModule}"`)
})
}
selectedModule.split(',').forEach(function(myModule){