0

I'm trying to install the Nasa OpenSatKit on my computer. It is a Ubuntu 20.04 distribution of Linux. When I try to install I receive this command:

/dev/fd/63: line 16: OPEN_SAT_KIT_PATH: invalid indirect expansion

I install it using this wget command: bash <(\wget -qO- https://raw.githubusercontent.com/OpenSatKit/OpenSatKit/vendor/install.sh

Also, it says that line 16 is the problem. I looked at line 16 for the installation and here are the first 18 lines: `

#!/usr/bin/env bash

OPEN_SAT_KIT_VERSION="2.2.0"
BASE_DIR="$(pwd)"

# Intentional order: OSK Archive, Dependencies, COSMOS, Build System 
# - Dependencies cover OSK's needs, COSMOS may need additional ones
# - OSK last ensures OSK COSMOS config files not overrriden

main()
{

announce "INSTALLATION WILL TAKE TIME AND INCLUDES PROMPTS!"

# set default path unless environment var exists
if [ ! -n "${!OPEN_SAT_KIT_PATH}" ]; then
   OPEN_SAT_KIT_PATH="`pwd`/OpenSatKit-master/"
fi

`

Note that line 16 is " if [ ! -n "${!OPEN_SAT_KIT_PATH}" ]; then " . Can someone help me install this please or tell me why it isn't working?

Reean
  • 27
  • 5

2 Answers2

1

Looks like it is a typo here. I guess the code was supposed to check if the variable is not set and if it isn't, assign some default value to it. Remove the !.

More about indirect expansion could be found in this thread and in bash manual shell expansions.

KamilCuk
  • 120,984
  • 8
  • 59
  • 111
0

It is my understanding that the present version of OpenSatKit, particularly COSMOS, is incompatible with Ubuntu 20.04. Consider installing it with Ubuntu 18.4 LTS.