mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-09-03 08:25:25 +02:00
DATA_DIR override with environment variable (#333)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
/*
|
||||
* Copyright (C) 2023 Gwenhael Goavec-Merou <[email protected]>
|
||||
*/
|
||||
|
||||
#ifndef SRC_COMMON_HPP_
|
||||
#define SRC_COMMON_HPP_
|
||||
|
||||
#include <string>
|
||||
|
||||
/*!
|
||||
* \brief return shell environment variable value
|
||||
* \param[in] key: variable name
|
||||
* \param[in] def_val: value to return when not found
|
||||
* \return variable value or def_val
|
||||
*/
|
||||
const std::string get_shell_env_var(const char* key,
|
||||
const char *def_val="") noexcept;
|
||||
|
||||
#endif // SRC_COMMON_HPP_
|
||||
Reference in New Issue
Block a user