# Job Arranger for ZABBIX
# Copyright (C) 2025 Daiwa Institute of Research Ltd. All Rights Reserved.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

#!/bin/bash

# Exit immediately if any command exits with a non-zero status
set -e

go build client.go

DESTDIR=../../../../../../bin/
mkdir -p "$DESTDIR"

cp -f client "$DESTDIR/start_icon_client"
cp -f client "$DESTDIR/end_icon_client"
cp -f client "$DESTDIR/if_icon_client"
cp -f client "$DESTDIR/variable_icon_client"
cp -f client "$DESTDIR/job_icon_client"
cp -f client "$DESTDIR/jobnet_icon_client"
cp -f client "$DESTDIR/m_icon_client"
cp -f client "$DESTDIR/w_icon_client"
cp -f client "$DESTDIR/loop_icon_client"
cp -f client "$DESTDIR/extension_icon_client"
cp -f client "$DESTDIR/calc_icon_client"
cp -f client "$DESTDIR/task_icon_client"
cp -f client "$DESTDIR/info_icon_client"
cp -f client "$DESTDIR/ifend_icon_client"
cp -f client "$DESTDIR/fcopy_icon_client"
cp -f client "$DESTDIR/fwait_icon_client"
cp -f client "$DESTDIR/reboot_icon_client"
cp -f client "$DESTDIR/release_icon_client"
cp -f client "$DESTDIR/agentless_icon_client"
cp -f client "$DESTDIR/zabbix_icon_client"


rm -rf ./client