1#!/usr/bin/env bash 2# 3# This work is dual-licensed under the Apache License 2.0 4# and European Union Public License. See LICENSE file for details. 5# 6# Parts of this file Copyright (c) 2018 Evolveum and contributors 7# 8 9if [ $# -eq 0 ]; then 10 echo "No arguments supplied" 11 exit 1 12fi 13 14SCRIPT_PATH=$(cd $(dirname "$0") && pwd -P)/ 15 16# resolve links - $0 may be a softlink 17PRG="$0" 18 19PRGDIR=`dirname "$PRG"` 20 21MIDPOINT_EXISTING_FOLDER="$1" 22 23if [ ! -d "$MIDPOINT_EXISTING_FOLDER" ]; then 24 echo "'$MIDPOINT_EXISTING_FOLDER' is not a folder" 25 exit 1 26fi 27 28# MOVE TO *37 29#drwxr-xr-x 13 bin 30#drwxr-xr-x 4 lib 31 32mv $MIDPOINT_EXISTING_FOLDER/bin $MIDPOINT_EXISTING_FOLDER/bin.backup 33mv $MIDPOINT_EXISTING_FOLDER/lib $MIDPOINT_EXISTING_FOLDER/lib.backup 34 35# DELETE 36#drwxr-xr-x 6 doc 37rm -rf $MIDPOINT_EXISTING_FOLDER/doc 38 39# DON'T TOUCH 40#drwxr-xr-x 17 var 41 42# REPLACE 43#-rw-r--r-- 1 INSTALL 44#-rw-r--r-- 1 LICENSE 45#-rw-r--r-- 1 NEWS 46#-rw-r--r-- 1 NOTICE 47#-rw-r--r-- 1 README 48#-rw-r--r-- 1 RELEASE-NOTES 49 50# COPY everything from 3.8 51 52cp -r "$PRGDIR/.."/* $MIDPOINT_EXISTING_FOLDER/ 53