Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Copy uninstall scripts #1232

Merged
merged 11 commits into from
Apr 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions earth_enterprise/SConstruct
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#-*- Python -*-
#
# Copyright 2017 Google Inc.
# Copyright 2019 Open GEE Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -169,6 +170,12 @@ stage_bin = env.PhonyTargets(**stage_bin_cmds)
stage_data = env.Alias('stage_data', installdirs['root'])
Amndeep7 marked this conversation as resolved.
Show resolved Hide resolved
env.Depends(stage_data, stage_bin)

# Copy the uninstall scripts to the install staging directory
env.copyfile(inst_common_dir('.'), './src/installer/uninstall_fusion.sh')
env.copyfile(inst_common_dir('.'), './src/installer/uninstall_server.sh')
env.copyfile(inst_common_dir('.'), './src/installer/common.sh')
env.copyfile(inst_common_dir('.'), './src/version.txt')

# Copy the tutorial to the install staging directory if it exists.
stage_tutorial_cmds = {'stage_tutorial': [
'cd tutorial; if [ -d FusionTutorial ]; then scons -j%d installdir="%s"; else echo "Skipping tutorial; no tutorial files found."; fi' % (num_jobs, installdir)
Expand Down
8 changes: 6 additions & 2 deletions earth_enterprise/src/installer/install_fusion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,12 @@ copy_files_to_target()
cp -f $TMPOPENLDAPPATH/ldap.conf.default $BASEINSTALLDIR_ETC/openldap
if [ $? -ne 0 ]; then error_on_copy=1; fi

# TODO: final step: copy uninstall script
# cp -f $TMPOPENLDAPPATH/<........> $INSTALL_LOG_DIR
cp -f $TMPINSTALLDIR/common/opt/google/uninstall_fusion.sh $INSTALL_LOG_DIR
if [ $? -ne 0 ]; then error_on_copy=1; fi
cp -f $TMPINSTALLDIR/common/opt/google/common.sh $INSTALL_LOG_DIR
if [ $? -ne 0 ]; then error_on_copy=1; fi
cp -f $TMPINSTALLDIR/common/opt/google/version.txt $BASEINSTALLDIR_OPT
if [ $? -ne 0 ]; then error_on_copy=1; fi

if [ $error_on_copy -ne 0 ]
then
Expand Down
8 changes: 6 additions & 2 deletions earth_enterprise/src/installer/install_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,12 @@ copy_files_to_target()
cp -f "$TMPOPENLDAPPATH/ldap.conf.default" "$BASEINSTALLDIR_ETC/openldap"
Amndeep7 marked this conversation as resolved.
Show resolved Hide resolved
if [ $? -ne 0 ]; then error_on_copy=1; fi

# TODO: final step: copy uninstall script
# cp -f $TMPOPENLDAPPATH/<........> $INSTALL_LOG_DIR
cp -f $TMPINSTALLDIR/common/opt/google/uninstall_server.sh $INSTALL_LOG_DIR
if [ $? -ne 0 ]; then error_on_copy=1; fi
cp -f $TMPINSTALLDIR/common/opt/google/common.sh $INSTALL_LOG_DIR
if [ $? -ne 0 ]; then error_on_copy=1; fi
cp -f $TMPINSTALLDIR/common/opt/google/version.txt $BASEINSTALLDIR_OPT
if [ $? -ne 0 ]; then error_on_copy=1; fi

if [ "$error_on_copy" -ne 0 ]
then
Expand Down
2 changes: 1 addition & 1 deletion earth_enterprise/src/scons/khEnvironment.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def alias(self, target, source=None):
# Re-call all the target builders to add the sources to each target.
result = []
for t in tlist:
bld = t.get_builder() or my_alias_builder
bld = t.get_builder() if t.has_builder() else my_alias_builder
result.extend(bld(self, t, source))
return result

Expand Down