Changes between Initial Version and Version 1 of InstallPkg


Ignore:
Timestamp:
Jan 18, 2019, 4:38:18 PM (5 years ago)
Author:
hales
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallPkg

    v1 v1  
     1= Install Package =
     2
     3install a `.pkg` file to the robot (via SFTP and `PackageManager` service)
     4
     5run simply as
     6{{{
     7./install_pkg.py new_app-0.0.1.pkg
     8}}}
     9
     10during the development usually run via `Makefile` as
     11{{{
     12cd myapps/new_app
     13make -f ../Makefile pkg install
     14}}}
     15
     16where the `Makefile` contains
     17{{{#!make
     18BASE_DIR=$(HOME)/src/pepper
     19INSTALL_PKG=$(BASE_DIR)/bin/install_pkg.py
     20MYAPPS_DIR=$(BASE_DIR)/myapps
     21
     22pkg:
     23        pkgname=$(wildcard *.pml); \
     24        if [ -z "$$pkgname" ]; then \
     25                echo "I need a .pml file here"; \
     26                exit 1; \
     27        fi; \
     28        basename="`basename -s .pml $$pkgname`"; \
     29        rm -fv $$basename*.pkg; \
     30        qipkg bump-version manifest.xml; \
     31        qipkg make-package $$pkgname; \
     32        mv -v $$basename*.pkg $(MYAPPS_DIR)
     33
     34install:
     35        pkgname=$(wildcard *.pml); \
     36        if [ -z "$$pkgname" ]; then \
     37                echo "I need a .pml file here"; \
     38                exit 1; \
     39        fi; \
     40        basename="`basename -s .pml $$pkgname`"; \
     41        pkgfile="`ls -t $(MYAPPS_DIR)/$$basename*pkg|head -n1`"; \
     42        if [ -z "$$pkgfile" ]; then \
     43                echo "Package file for $$basename not found in $(MYAPPS_DIR)"; \
     44                exit 1; \
     45        fi; \
     46        $(INSTALL_PKG) $$pkgfile
     47}}}