add install script to /opt/bin

master
Kebler Network System Administrator 2023-01-17 15:42:56 -08:00
parent dfc0ecf966
commit 6e0856c5de
2 changed files with 5 additions and 1 deletions

3
build
View File

@ -103,6 +103,7 @@ while getopts ':b:d:t:ncr:u:pxhs:w:akvo' OPTION; do
;; ;;
h) h)
exit_abnormal 0 exit_abnormal 0
return 0
;; ;;
*) *)
echo "unknown $0 option -$OPTARG" echo "unknown $0 option -$OPTARG"
@ -120,7 +121,7 @@ RUSER=${3:-$RUSER}
IMAGE_NAME=$([[ $RUSER ]] && echo ${RUSER}/)${name}$([[ (! $exclude_distro) && $name ]] && echo "-")$([[ ! $exclude_distro ]] && echo ${LINUX_DISTRO}) IMAGE_NAME=$([[ $RUSER ]] && echo ${RUSER}/)${name}$([[ (! $exclude_distro) && $name ]] && echo "-")$([[ ! $exclude_distro ]] && echo ${LINUX_DISTRO})
# TODO writing to existing tag untags existing image so write a new tag to that image then continue # TODO writing to existing tag untags existing image so write a new tag to that image then continue
# [[ $(image_exists $IMAGE_NAME) ]] && [[ ! $overwrite ]] && { echo local image \'$(make_tag $IMAGE_NAME)\' exists use -o to overwrite; return 1; } [[ $(image_exists $IMAGE_NAME) ]] && [[ ! $overwrite ]] && { echo local image \'$(make_tag $IMAGE_NAME)\' exists use -o to overwrite; return 1; }
if [[ $BASE_IMAGE ]]; then if [[ $BASE_IMAGE ]]; then
echo determining DISTRO of base image: $BASE_IMAGE echo determining DISTRO of base image: $BASE_IMAGE

3
install Normal file → Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
ln -nsf $(dirname "$(realpath "$BASH_SOURCE")")/build /opt/bin/dbuild
dbuild -h