)]}'
{"devstack/upgrade/shutdown.sh":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"df6a8f2468840e8137db9c2a969c334e224d6bbb","unresolved":false,"context_lines":[{"line_number":13,"context_line":"source $BASE_DEVSTACK_DIR/lib/tls"},{"line_number":14,"context_line":"source $BASE_DEVSTACK_DIR/lib/apache"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"IRONIC_DEVSTACK_DIR\u003d$(cd $(dirname \"$0\")/.. \u0026\u0026 pwd)"},{"line_number":17,"context_line":"source $IRONIC_DEVSTACK_DIR/lib/ironic"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"set -o xtrace"}],"source_content_type":"text/x-sh","patch_set":3,"id":"dab17558_f8d820f1","line":16,"updated":"2016-05-17 08:12:06.000000000","message":"why not\n\n IRONIC_DEVSTACK_DIR\u003d$(dirname \"$0\")\n\n?","commit_id":"8d0c051662ea6185b008b3d3b1849b86aefc7d6e"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"bf7adfaf6cd50989fcf0abc013482eb6ad4a38b1","unresolved":false,"context_lines":[{"line_number":13,"context_line":"source $BASE_DEVSTACK_DIR/lib/tls"},{"line_number":14,"context_line":"source $BASE_DEVSTACK_DIR/lib/apache"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"IRONIC_DEVSTACK_DIR\u003d$(cd $(dirname \"$0\")/.. \u0026\u0026 pwd)"},{"line_number":17,"context_line":"source $IRONIC_DEVSTACK_DIR/lib/ironic"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"set -o xtrace"}],"source_content_type":"text/x-sh","patch_set":3,"id":"dab17558_d5c23033","line":16,"in_reply_to":"dab17558_0d02fbb3","updated":"2016-05-17 13:53:54.000000000","message":"I am pretty sure I need to use the $0 value to determine where this script is located.  Just \u0027pwd\u0027 doesn\u0027t work because I don\u0027t know where we are being executed from.\n\nSo the idea is to change into the directory one level up from where this script is located \u0027 cd $(dirname \"$0\")/.. \u0027 and then get the value of where we are \u0027 pwd \u0027\n\nI will add a comment to that effect.","commit_id":"8d0c051662ea6185b008b3d3b1849b86aefc7d6e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4f746cd1cbcda65f784efa00eb74d3bea0a6cd7b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"source $BASE_DEVSTACK_DIR/lib/tls"},{"line_number":14,"context_line":"source $BASE_DEVSTACK_DIR/lib/apache"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"IRONIC_DEVSTACK_DIR\u003d$(cd $(dirname \"$0\")/.. \u0026\u0026 pwd)"},{"line_number":17,"context_line":"source $IRONIC_DEVSTACK_DIR/lib/ironic"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"set -o xtrace"}],"source_content_type":"text/x-sh","patch_set":3,"id":"dab17558_8fcecd57","line":16,"in_reply_to":"dab17558_0f3c9d91","updated":"2016-05-17 15:17:40.000000000","message":"I\u0027d try to avoid cargo-culting bash snippets :)","commit_id":"8d0c051662ea6185b008b3d3b1849b86aefc7d6e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"809e282f212d19262ff7f5cccab78d8cc5c07a14","unresolved":false,"context_lines":[{"line_number":13,"context_line":"source $BASE_DEVSTACK_DIR/lib/tls"},{"line_number":14,"context_line":"source $BASE_DEVSTACK_DIR/lib/apache"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"IRONIC_DEVSTACK_DIR\u003d$(cd $(dirname \"$0\")/.. \u0026\u0026 pwd)"},{"line_number":17,"context_line":"source $IRONIC_DEVSTACK_DIR/lib/ironic"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"set -o xtrace"}],"source_content_type":"text/x-sh","patch_set":3,"id":"dab17558_0d02fbb3","line":16,"in_reply_to":"dab17558_b1a353b1","updated":"2016-05-17 10:17:07.000000000","message":"Ok,\n\n IRONIC_DEVSTACK_DIR\u003d$(dirname `pwd`)/..\n\n:)","commit_id":"8d0c051662ea6185b008b3d3b1849b86aefc7d6e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"65ec16a2c9b915f304017764fbee35401e201181","unresolved":false,"context_lines":[{"line_number":13,"context_line":"source $BASE_DEVSTACK_DIR/lib/tls"},{"line_number":14,"context_line":"source $BASE_DEVSTACK_DIR/lib/apache"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"IRONIC_DEVSTACK_DIR\u003d$(cd $(dirname \"$0\")/.. \u0026\u0026 pwd)"},{"line_number":17,"context_line":"source $IRONIC_DEVSTACK_DIR/lib/ironic"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"set -o xtrace"}],"source_content_type":"text/x-sh","patch_set":3,"id":"dab17558_f8648949","line":16,"in_reply_to":"dab17558_d5c23033","updated":"2016-05-17 14:08:06.000000000","message":"\u003e So the idea is to change into the directory one level up from where this script is located \u0027 cd $(dirname \"$0\")/.. \u0027 and then get the value of where we are \u0027 pwd \u0027\n\nThis value is $(dirname \"$0\")/.. (sorry for a typo in my previous comment) modulo absolute vs relative path, which does not matter here","commit_id":"8d0c051662ea6185b008b3d3b1849b86aefc7d6e"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"ec35884891c7e9431ec6d09e70d75e7e86be0a9f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"source $BASE_DEVSTACK_DIR/lib/tls"},{"line_number":14,"context_line":"source $BASE_DEVSTACK_DIR/lib/apache"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"IRONIC_DEVSTACK_DIR\u003d$(cd $(dirname \"$0\")/.. \u0026\u0026 pwd)"},{"line_number":17,"context_line":"source $IRONIC_DEVSTACK_DIR/lib/ironic"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"set -o xtrace"}],"source_content_type":"text/x-sh","patch_set":3,"id":"dab17558_0f3c9d91","line":16,"in_reply_to":"dab17558_f8648949","updated":"2016-05-17 15:13:46.000000000","message":"I was sort of following how devstack does it:\n\nWe are also using this idiom here:\n https://github.com/openstack/ironic/blob/master/devstack/tools/ironic/scripts/create-node.sh#L10\n https://github.com/openstack/ironic/blob/master/devstack/tools/ironic/scripts/setup-network.sh#L13\n\nAnd in devstack, for example:\n https://github.com/openstack-dev/devstack/blob/master/functions#L18","commit_id":"8d0c051662ea6185b008b3d3b1849b86aefc7d6e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"c757d3f53ff499172b709ebb439ad39a224edf40","unresolved":false,"context_lines":[{"line_number":13,"context_line":"source $BASE_DEVSTACK_DIR/lib/tls"},{"line_number":14,"context_line":"source $BASE_DEVSTACK_DIR/lib/apache"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"IRONIC_DEVSTACK_DIR\u003d$(cd $(dirname \"$0\")/.. \u0026\u0026 pwd)"},{"line_number":17,"context_line":"source $IRONIC_DEVSTACK_DIR/lib/ironic"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"set -o xtrace"}],"source_content_type":"text/x-sh","patch_set":3,"id":"dab17558_b1a353b1","line":16,"in_reply_to":"dab17558_f8d820f1","updated":"2016-05-17 08:59:06.000000000","message":"I believe he wants to get the parent\u0027s dir path here instead of the base dir. \n\nIf that\u0027s the case:\n\n IRONIC_DEVSTACK_DIR\u003d$(dirname `pwd`)","commit_id":"8d0c051662ea6185b008b3d3b1849b86aefc7d6e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6d1f43f8a18d61243649818125d67cd8850d1ebd","unresolved":false,"context_lines":[{"line_number":13,"context_line":"source $BASE_DEVSTACK_DIR/lib/tls"},{"line_number":14,"context_line":"source $BASE_DEVSTACK_DIR/lib/apache"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"IRONIC_DEVSTACK_DIR\u003d$(cd $(dirname \"$0\")/.. \u0026\u0026 pwd)"},{"line_number":17,"context_line":"source $IRONIC_DEVSTACK_DIR/lib/ironic"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"set -o xtrace"}],"source_content_type":"text/x-sh","patch_set":4,"id":"dab17558_d8f0a593","line":16,"range":{"start_line":16,"start_character":20,"end_line":16,"end_character":51},"updated":"2016-05-17 14:06:52.000000000","message":"no, sorry, lets not produce more weird bash code\n\n IRONIC_DEVSTACK_DIR\u003d$(dirname \"$0\")/..","commit_id":"0b797b6fd8e3cfa6bfd0f381daf33aee63eb495e"}],"devstack/upgrade/upgrade.sh":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"df6a8f2468840e8137db9c2a969c334e224d6bbb","unresolved":false,"context_lines":[{"line_number":41,"context_line":"source $TARGET_DEVSTACK_DIR/lib/tls"},{"line_number":42,"context_line":"source $TARGET_DEVSTACK_DIR/lib/nova"},{"line_number":43,"context_line":"source $TARGET_DEVSTACK_DIR/lib/neutron-legacy"},{"line_number":44,"context_line":"IRONIC_DEVSTACK_DIR\u003d$(cd $(dirname \"$0\")/.. \u0026\u0026 pwd)"},{"line_number":45,"context_line":"source $IRONIC_DEVSTACK_DIR/lib/ironic"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# Print the commands being run so that we can see the command that triggers"}],"source_content_type":"text/x-sh","patch_set":3,"id":"dab17558_58e4ccaa","line":44,"updated":"2016-05-17 08:12:06.000000000","message":"ditto","commit_id":"8d0c051662ea6185b008b3d3b1849b86aefc7d6e"}]}
