justing-bq commented on code in PR #49766:
URL: https://github.com/apache/arrow/pull/49766#discussion_r3268700193


##########
cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh:
##########
@@ -42,44 +42,44 @@ fi
 
 case "$(uname)" in
   Linux)
-    USER_ODBCINST_FILE="/etc/odbcinst.ini"
+    ODBCINST_FILE="/etc/odbcinst.ini"
     ;;
   *)
     # macOS
-    USER_ODBCINST_FILE="$HOME/Library/ODBC/odbcinst.ini"
-    mkdir -p "$HOME"/Library/ODBC
+    ODBCINST_FILE="/Library/ODBC/odbcinst.ini"
+    mkdir -p /Library/ODBC
     ;;
 esac
 
 DRIVER_NAME="Apache Arrow Flight SQL ODBC Driver"
 
-touch "$USER_ODBCINST_FILE"
+touch "$ODBCINST_FILE"
 
-if grep -q "^\[$DRIVER_NAME\]" "$USER_ODBCINST_FILE"; then
+if grep -q "^\[$DRIVER_NAME\]" "$ODBCINST_FILE"; then
   echo "Driver [$DRIVER_NAME] already exists in odbcinst.ini"
 else
   echo "Adding [$DRIVER_NAME] to odbcinst.ini..."
   echo "
 [$DRIVER_NAME]
 Description=An ODBC Driver for Apache Arrow Flight SQL
 Driver=$ODBC_64BIT
-" >>"$USER_ODBCINST_FILE"
+" >>"$ODBCINST_FILE"
 fi
 
 # Check if [ODBC Drivers] section exists
-if grep -q '^\[ODBC Drivers\]' "$USER_ODBCINST_FILE"; then
+if grep -q '^\[ODBC Drivers\]' "$ODBCINST_FILE"; then
   # Section exists: check if driver entry exists
-  if ! grep -q "^${DRIVER_NAME}=" "$USER_ODBCINST_FILE"; then
+  if ! grep -q "^${DRIVER_NAME}=" "$ODBCINST_FILE"; then
     # Driver entry does not exist, add under [ODBC Drivers]
     sed -i '' "/^\[ODBC Drivers\]/a\\
 ${DRIVER_NAME}=Installed
-" "$USER_ODBCINST_FILE"
+" "$ODBCINST_FILE"

Review Comment:
   `sed -i` is no longer used.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to