/core/externals/update-engine/Samples/EngineRunner/engine_install
#! | 28 lines | 23 code | 5 blank | 0 comment | 0 complexity | a389d6815c71f68e9d599234ef6435ec MD5 | raw file
1#!/bin/bash 2 3# Copy the disk image's executable over the existing EngineRunner 4# executable. This is safe to do. The old executable is still open 5# and mapped, so won't be disturbed. It doesn't load any resources 6# either. 7 8# Make sure we have the KS_TICKET_XC_PATH enviornment variable. 9# This is taken from the ticket. 10if [ "${KS_TICKET_XC_PATH:=undefined}" = "undefined" ]; then 11 echo "D'oh! The ticket doesn't have an existence checker path." 12 echo "That path is used to figure out which EngineRunner to update" 13 exit 1 14 15else 16 # Run the copy. 17 cp "$1/EngineRunner" "${KS_TICKET_XC_PATH}" 18 19 # Did it succeed? 20 if [ $? != 0 ]; then 21 echo "D'oh! Copy command to ${KS_TICKET_XC_PATH} failed." 22 echo "Are the destination permissions ok?" 23 exit 1 24 fi 25fi 26 27# Happiness and light. 28exit 0