mirror of
https://github.com/UnRAIDES/unRAID-NerdTools
synced 2025-04-04 23:43:43 +00:00
update develop files
This commit is contained in:
parent
ad1cdb9603
commit
841cd439c4
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
# DEVELOPED FOLDERS
|
||||
upgrade-packages
|
||||
|
||||
develop/rsync.txt
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
php create.json.php 6.11 > ../contents/packages.6.11.json
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
$version = isset($argv[1])? $argv[1]: '6.11';
|
||||
|
||||
$array = array();
|
||||
|
||||
$files = glob(__DIR__."/../packages/$version/*.{txz,tgz}", GLOB_BRACE);
|
||||
foreach($files as $txz){
|
||||
//echo $txz, "\n";
|
||||
|
||||
$array[] = file_check_sha1($txz);
|
||||
}
|
||||
|
||||
// Compare the github sha1 value of a file
|
||||
function file_check_sha1($file) {
|
||||
global $version;
|
||||
|
||||
$size = filesize($file);
|
||||
$contents = file_get_contents($file);
|
||||
|
||||
// create a sha1 like github does
|
||||
$str = "blob ".$size."\0".$contents;
|
||||
$sha1_file = sha1($str);
|
||||
|
||||
$detalle = array();
|
||||
|
||||
#print('Downloading file_check_sha1 => size ['.$size.'] package...');
|
||||
#print('Downloading file_check_sha1 => sha1_file ['.$sha1_file.'] package...');
|
||||
#print('Downloading file_check_sha1 => sha1_file ['.sha1($contents).'] package...');
|
||||
|
||||
//echo "$file => $sha1_file => $size \n";
|
||||
$detalle['name'] = basename($file);
|
||||
$detalle['path'] = "packages/$version/".basename($file);
|
||||
$detalle['sha'] = $sha1_file;
|
||||
$detalle['size'] = $size;
|
||||
$detalle['download_url'] = "https://raw.githubusercontent.com/UnRAIDES/unRAID-NerdTools/main/packages/$version/".basename($file);
|
||||
$detalle['type'] = 'file';
|
||||
|
||||
//print_r($detalle);
|
||||
//print_r($detalle);
|
||||
// $detalle['download_url'] = "https://raw.githubusercontent.com/UnRAIDES/unRAID-NerdPack/master/packages/$version/".basename($file);
|
||||
|
||||
|
||||
return ($detalle);
|
||||
}
|
||||
|
||||
echo json_encode($array,JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES );
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -1,11 +1,11 @@
|
|||
# Generador de json por version
|
||||
|
||||
php create.json.php 6.11 > ../contents/packages.6.11.json
|
||||
|
||||
MODO DE USO
|
||||
|
||||
# Generador de version de plugin
|
||||
|
||||
Ejemplos:
|
||||
./unraidmpkg.sh
|
||||
./unraidmpkg.sh a
|
||||
./unraidmpkg.sh b
|
||||
./unraidmpkg.sh c
|
||||
./develop/unraidmpkg.sh
|
||||
./develop/unraidmpkg.sh a
|
||||
./develop/unraidmpkg.sh b
|
||||
./develop/unraidmpkg.sh c
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
BASEDIR=$PWD
|
||||
|
||||
|
||||
cd ../source/NerdTools
|
||||
cd source/NerdTools
|
||||
./pkg_build.sh $1
|
||||
|
||||
|
||||
|
@ -14,9 +14,9 @@ echo "VERSION: $version"
|
|||
echo "${BASH_SOURCE[0]}"
|
||||
|
||||
# CALCULATE MD5
|
||||
md5=($(md5sum ${BASEDIR}/../archive/NerdTools-${version}-x86_64-1.txz))
|
||||
md5=($(md5sum ${BASEDIR}/archive/NerdTools-${version}-x86_64-1.txz))
|
||||
echo ${md5}
|
||||
|
||||
sed -i "s/ENTITY version .*/ENTITY version \"$version\">"/ "$BASEDIR/../plugin/NerdTools.plg"
|
||||
sed -i "s/ENTITY md5 .*/ENTITY md5 \"$md5\">"/ "$BASEDIR/../plugin/NerdTools.plg"
|
||||
sed -i "s/ENTITY version .*/ENTITY version \"$version\">"/ "$BASEDIR/plugin/NerdTools.plg"
|
||||
sed -i "s/ENTITY md5 .*/ENTITY md5 \"$md5\">"/ "$BASEDIR/plugin/NerdTools.plg"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user