Commit f3c5db5d authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Merge branch 'master' of https://github.com/Elphel/meta-elphel393

parents af102a1c 1aeb6d8c
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
# Well

# returns string - based on file
def version_update(path,file,evr):
    for line in open(path+'/'+file):
        line = line.strip()
        if (line[0]!="#"):
            break
    arr = line.split('.')
    try:
        arr[evr]
    except IndexError:
        if (evr==1): res = 0
        if (evr==2): res = revision_update(path,file)
    else:
        res = arr[evr]
    return res
    
def revision_update(path,file):
    import subprocess
    cmd = "cd "+path+"; git rev-list --count $(git log -1 --pretty=format:\"%H\" "+file+")..HEAD"
    try:
        res = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
    except subprocess.CalledProcessError as e:
        res = "error_"+e.returncode
    res = res.strip(' \t\n\r')
    return res
+3 −3
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ function init(){
	
	ct2 = $("<div style='padding-top:20px;'>");
	
	tmpstr = "Absolute path: <input id='abspath' style='text' value='/tmp/mnt/sda1' class='ap' />";
	tmpstr = "Absolute path: <input id='abspath' style='text' value='/mnt/sda1' class='ap' />";
	
	ct2.html(tmpstr);
	$("#controls").append(ct2);
@@ -212,14 +212,14 @@ function get_files(){

function init_path(){
	$.ajax({
		url:"camogm.php?cmd=list&path=/tmp/mnt",
		url:"camogm.php?cmd=list&path=/mnt",
		complete: function(data){
			var xml = data.responseXML;
			var dirs = $(xml).find("d");
			var res = false;
			for(var i=0;i<dirs.length;i++){
				var tmp = $(dirs[i]).text();
				if (tmp=="/tmp/mnt/sda1") {
				if (tmp=="/mnt/sda1") {
					$("#abspath").val(tmp);
					res = true;
				}
+4 −4
Original line number Diff line number Diff line
@@ -71,9 +71,9 @@ if ($cmd=="create_symlink"){
	if (isset($_GET['path'])) {
		$path = $_GET['path'];
		if (is_dir($path)){
			//exec("ln -sf $path /www/pages/video;sync");
			if (file_exists("/tmp/video")) unlink("/tmp/video");
                        exec("ln -sf $path /tmp/video");
			exec("ln -sf $path /www/pages/video;sync");
			//if (file_exists("/tmp/video")) unlink("/tmp/video");
                        //exec("ln -sf $path /tmp/video");
		}
	}
}
@@ -90,7 +90,7 @@ if ($cmd=="start"){
	fprintf($fcmd,"exit;\n");
	exec('sync');
}else if ($cmd=="default"){
	fprintf($fcmd,"format=mov;exif=0;prefix=/tmp/mnt/sda1/;\n");
	fprintf($fcmd,"format=mov;exif=0;prefix=/mnt/sda1/;\n");
}else{
	fprintf($fcmd,"$cmd\n");
	//exec('sync');
+4 −0
Original line number Diff line number Diff line
@@ -20,3 +20,7 @@ IMAGE_ROOTFS_SIZE = "8192"

BAD_RECOMMENDATIONS += "busybox-syslog"
 
do_compile_append(){
    echo "VIRTUAL-RUNTIME_base-utils= ${VIRTUAL-RUNTIME_base-utils}"
    echo "ROOTFS_BOOTSTRAP_INSTALL= ${ROOTFS_BOOTSTRAP_INSTALL}"
}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ DAEMON=/usr/sbin/init_elphel393
NAME=init_elphel393
DESC="extra init scripts"

MNTPOINT=/tmp/mnt/mmc
MNTPOINT=/mnt/mmc
MMCDEV=/dev/mmcblk0p1
SOME_SCRIPT=init_elphel393.sh

Loading